Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 3701c47

Browse files
author
Anselm Kruis
committed
Merge tag v3.8.1 into 3.8-slp
2 parents d6b5d8d + 1b293b6 commit 3701c47

38 files changed

+554
-84
lines changed

.azure-pipelines/windows-release/build-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ steps:
4343

4444
- powershell: |
4545
$env:SigningCertificate = $null
46-
python PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch)
46+
$(_HostPython) PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch)
4747
makecat "${env:CAT}.cdf"
4848
del "${env:CAT}.cdf"
4949
if (-not (Test-Path "${env:CAT}.cat")) {

.azure-pipelines/windows-release/stage-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,31 @@ jobs:
5757
Arch: win32
5858
Platform: x86
5959
Configuration: Release
60+
_HostPython: .\python
6061
win32_d:
6162
Name: win32_d
6263
Arch: win32
6364
Platform: x86
6465
Configuration: Debug
66+
_HostPython: .\python
6567
amd64_d:
6668
Name: amd64_d
6769
Arch: amd64
6870
Platform: x64
6971
Configuration: Debug
72+
_HostPython: .\python
7073
arm64:
7174
Name: arm64
7275
Arch: arm64
7376
Platform: ARM64
7477
Configuration: Release
78+
_HostPython: python
7579
arm64_d:
7680
Name: arm64_d
7781
Arch: arm64
7882
Platform: ARM64
7983
Configuration: Debug
84+
_HostPython: python
8085

8186
steps:
8287
- template: ./build-steps.yml
@@ -98,6 +103,7 @@ jobs:
98103
Arch: amd64
99104
Platform: x64
100105
Configuration: Release
106+
_HostPython: .\python
101107

102108
steps:
103109
- template: ./build-steps.yml
@@ -123,6 +129,7 @@ jobs:
123129
Arch: amd64
124130
Platform: x64
125131
Configuration: Release
132+
_HostPython: .\python
126133

127134
steps:
128135
- template: ./build-steps.yml

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: c
22
dist: xenial
3-
group: beta
43

54
# To cache doc-building dependencies and C compiler output.
65
cache:

Doc/c-api/sys.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,18 @@ accessible to C code. They all work with the current interpreter thread's
320320
arguments to this function will be consumed, using it may cause reference
321321
leaks.)
322322
323+
Note that ``#`` format characters should always be treated as
324+
``Py_ssize_t``, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined.
325+
323326
:func:`sys.audit` performs the same function from Python code.
324327
325328
.. versionadded:: 3.8
326329
330+
.. versionchanged:: 3.8.2
331+
332+
Require ``Py_ssize_t`` for ``#`` format characters. Previously, an
333+
unavoidable deprecation warning was raised.
334+
327335
328336
.. c:function:: int PySys_AddAuditHook(Py_AuditHookFunction hook, void *userData)
329337

Doc/library/importlib.metadata.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ system `finders`_. To find a distribution package's metadata,
216216
``importlib.metadata`` queries the list of `meta path finders`_ on
217217
`sys.meta_path`_.
218218

219-
By default ``importlib.metadata`` installs a finder for distribution packages
220-
found on the file system. This finder doesn't actually find any *packages*,
221-
but it can find the packages' metadata.
219+
The default ``PathFinder`` for Python includes a hook that calls into
220+
``importlib.metadata.MetadataPathFinder`` for finding distributions
221+
loaded from typical file-system-based paths.
222222

223223
The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the
224224
interface expected of finders by Python's import system.
@@ -239,9 +239,9 @@ properties indicating the path to search and names to match and may
239239
supply other relevant context.
240240

241241
What this means in practice is that to support finding distribution package
242-
metadata in locations other than the file system, you should derive from
243-
``Distribution`` and implement the ``load_metadata()`` method. Then from
244-
your finder, return instances of this derived ``Distribution`` in the
242+
metadata in locations other than the file system, subclass
243+
``Distribution`` and implement the abstract methods. Then from
244+
a custom finder, return instances of this derived ``Distribution`` in the
245245
``find_distributions()`` method.
246246

247247

Doc/library/winreg.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ This module offers the following functions:
5353
The return value is the handle of the opened key. If the function fails, an
5454
:exc:`OSError` exception is raised.
5555

56+
.. audit-event:: winreg.ConnectRegistry computer_name,key winreg.ConnectRegistry
57+
5658
.. versionchanged:: 3.3
5759
See :ref:`above <exception-changed>`.
5860

@@ -75,6 +77,10 @@ This module offers the following functions:
7577
The return value is the handle of the opened key. If the function fails, an
7678
:exc:`OSError` exception is raised.
7779

80+
.. audit-event:: winreg.CreateKey key,sub_key,access winreg.CreateKey
81+
82+
.. audit-event:: winreg.OpenKey/result key winreg.CreateKey
83+
7884
.. versionchanged:: 3.3
7985
See :ref:`above <exception-changed>`.
8086

@@ -103,6 +109,10 @@ This module offers the following functions:
103109
The return value is the handle of the opened key. If the function fails, an
104110
:exc:`OSError` exception is raised.
105111

112+
.. audit-event:: winreg.CreateKey key,sub_key,access winreg.CreateKeyEx
113+
114+
.. audit-event:: winreg.OpenKey/result key winreg.CreateKeyEx
115+
106116
.. versionadded:: 3.2
107117

108118
.. versionchanged:: 3.3
@@ -124,6 +134,8 @@ This module offers the following functions:
124134
If the method succeeds, the entire key, including all of its values, is removed.
125135
If the method fails, an :exc:`OSError` exception is raised.
126136

137+
.. audit-event:: winreg.DeleteKey key,sub_key,access winreg.DeleteKey
138+
127139
.. versionchanged:: 3.3
128140
See :ref:`above <exception-changed>`.
129141

@@ -158,6 +170,8 @@ This module offers the following functions:
158170

159171
On unsupported Windows versions, :exc:`NotImplementedError` is raised.
160172

173+
.. audit-event:: winreg.DeleteKey key,sub_key,access winreg.DeleteKeyEx
174+
161175
.. versionadded:: 3.2
162176

163177
.. versionchanged:: 3.3
@@ -173,6 +187,8 @@ This module offers the following functions:
173187

174188
*value* is a string that identifies the value to remove.
175189

190+
.. audit-event:: winreg.DeleteValue key,value winreg.DeleteValue
191+
176192

177193
.. function:: EnumKey(key, index)
178194

@@ -187,6 +203,8 @@ This module offers the following functions:
187203
typically called repeatedly until an :exc:`OSError` exception is
188204
raised, indicating, no more values are available.
189205

206+
.. audit-event:: winreg.EnumKey key,index winreg.EnumKey
207+
190208
.. versionchanged:: 3.3
191209
See :ref:`above <exception-changed>`.
192210

@@ -220,6 +238,8 @@ This module offers the following functions:
220238
| | :meth:`SetValueEx`) |
221239
+-------+--------------------------------------------+
222240

241+
.. audit-event:: winreg.EnumValue key,index winreg.EnumValue
242+
223243
.. versionchanged:: 3.3
224244
See :ref:`above <exception-changed>`.
225245

@@ -235,6 +255,8 @@ This module offers the following functions:
235255
>>> ExpandEnvironmentStrings('%windir%')
236256
'C:\\Windows'
237257

258+
.. audit-event:: winreg.ExpandEnvironmentStrings str winreg.ExpandEnvironmentStrings
259+
238260

239261
.. function:: FlushKey(key)
240262

@@ -279,6 +301,8 @@ This module offers the following functions:
279301
If *key* is a handle returned by :func:`ConnectRegistry`, then the path
280302
specified in *file_name* is relative to the remote computer.
281303

304+
.. audit-event:: winreg.LoadKey key,sub_key,file_name winreg.LoadKey
305+
282306

283307
.. function:: OpenKey(key, sub_key, reserved=0, access=KEY_READ)
284308
OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ)
@@ -300,6 +324,10 @@ This module offers the following functions:
300324

301325
If the function fails, :exc:`OSError` is raised.
302326

327+
.. audit-event:: winreg.OpenKey key,sub_key,access winreg.OpenKey
328+
329+
.. audit-event:: winreg.OpenKey/result key winreg.OpenKey
330+
303331
.. versionchanged:: 3.2
304332
Allow the use of named arguments.
305333

@@ -330,6 +358,8 @@ This module offers the following functions:
330358
| | nanoseconds since Jan 1, 1601. |
331359
+-------+---------------------------------------------+
332360

361+
.. audit-event:: winreg.QueryInfoKey key winreg.QueryInfoKey
362+
333363

334364
.. function:: QueryValue(key, sub_key)
335365

@@ -347,6 +377,8 @@ This module offers the following functions:
347377
underlying API call doesn't return the type, so always use
348378
:func:`QueryValueEx` if possible.
349379

380+
.. audit-event:: winreg.QueryValue key,sub_key,value_name winreg.QueryValue
381+
350382

351383
.. function:: QueryValueEx(key, value_name)
352384

@@ -370,6 +402,8 @@ This module offers the following functions:
370402
| | :meth:`SetValueEx`) |
371403
+-------+-----------------------------------------+
372404

405+
.. audit-event:: winreg.QueryValue key,sub_key,value_name winreg.QueryValueEx
406+
373407

374408
.. function:: SaveKey(key, file_name)
375409

@@ -393,6 +427,8 @@ This module offers the following functions:
393427

394428
This function passes ``NULL`` for *security_attributes* to the API.
395429

430+
.. audit-event:: winreg.SaveKey key,file_name winreg.SaveKey
431+
396432

397433
.. function:: SetValue(key, sub_key, type, value)
398434

@@ -419,6 +455,8 @@ This module offers the following functions:
419455
The key identified by the *key* parameter must have been opened with
420456
:const:`KEY_SET_VALUE` access.
421457

458+
.. audit-event:: winreg.SetValue key,sub_key,type,value winreg.SetValue
459+
422460

423461
.. function:: SetValueEx(key, value_name, reserved, type, value)
424462

@@ -447,6 +485,8 @@ This module offers the following functions:
447485
bytes) should be stored as files with the filenames stored in the configuration
448486
registry. This helps the registry perform efficiently.
449487

488+
.. audit-event:: winreg.SetValue key,sub_key,type,value winreg.SetValueEx
489+
450490

451491
.. function:: DisableReflectionKey(key)
452492

@@ -463,6 +503,8 @@ This module offers the following functions:
463503
effect. Disabling reflection for a key does not affect reflection of any
464504
subkeys.
465505

506+
.. audit-event:: winreg.DisableReflectionKey key winreg.DisableReflectionKey
507+
466508

467509
.. function:: EnableReflectionKey(key)
468510

@@ -476,6 +518,8 @@ This module offers the following functions:
476518

477519
Restoring reflection for a key does not affect reflection of any subkeys.
478520

521+
.. audit-event:: winreg.EnableReflectionKey key winreg.EnableReflectionKey
522+
479523

480524
.. function:: QueryReflectionKey(key)
481525

@@ -489,6 +533,8 @@ This module offers the following functions:
489533
Will generally raise :exc:`NotImplementedError` if executed on a 32-bit
490534
operating system.
491535

536+
.. audit-event:: winreg.QueryReflectionKey key winreg.QueryReflectionKey
537+
492538

493539
.. _constants:
494540

@@ -741,6 +787,9 @@ integer handle, and also disconnect the Windows handle from the handle object.
741787
handle is not closed. You would call this function when you need the
742788
underlying Win32 handle to exist beyond the lifetime of the handle object.
743789

790+
.. audit-event:: winreg.PyHKEY.Detach key winreg.PyHKEY.Detach
791+
792+
744793
.. method:: PyHKEY.__enter__()
745794
PyHKEY.__exit__(\*exc_info)
746795

Doc/whatsnew/3.6.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,3 +2433,13 @@ In 3.6.7 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token
24332433
when provided with input that does not have a trailing new line. This behavior
24342434
now matches what the C tokenizer does internally.
24352435
(Contributed by Ammar Askar in :issue:`33899`.)
2436+
2437+
Notable changes in Python 3.6.10
2438+
================================
2439+
2440+
Due to significant security concerns, the *reuse_address* parameter of
2441+
:meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. This is
2442+
because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For more
2443+
details, see the documentation for ``loop.create_datagram_endpoint()``.
2444+
(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in
2445+
:issue:`37228`.)

Doc/whatsnew/3.7.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,3 +2541,13 @@ This resolves a long standing issue where all virtual environments would have
25412541
to be upgraded or recreated with each Python update. However, note that this
25422542
release will still require recreation of virtual environments in order to get
25432543
the new scripts.
2544+
2545+
Notable changes in Python 3.7.6
2546+
===============================
2547+
2548+
Due to significant security concerns, the *reuse_address* parameter of
2549+
:meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. This is
2550+
because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For more
2551+
details, see the documentation for ``loop.create_datagram_endpoint()``.
2552+
(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in
2553+
:issue:`37228`.)

Doc/whatsnew/3.8.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,3 +2206,13 @@ Here's a summary of performance improvements since Python 3.3:
22062206
loop_overhead 0.3 0.5 0.6 0.4 0.3 0.3
22072207
22082208
(Measured from the macOS 64-bit builds found at python.org)
2209+
2210+
Notable changes in Python 3.8.1
2211+
===============================
2212+
2213+
Due to significant security concerns, the *reuse_address* parameter of
2214+
:meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. This is
2215+
because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For more
2216+
details, see the documentation for ``loop.create_datagram_endpoint()``.
2217+
(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in
2218+
:issue:`37228`.)

Include/patchlevel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 8
2121
#define PY_MICRO_VERSION 1
22-
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
23-
#define PY_RELEASE_SERIAL 1
22+
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
23+
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.8.1rc1"
26+
#define PY_VERSION "3.8.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)