Python-checkins
Threads by month
- ----- 2025 -----
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
April 2020
- 1 participants
- 410 discussions

April 30, 2020
https://github.com/python/cpython/commit/6900f16d2207ca4fc252fa9d778ca0b13a…
commit: 6900f16d2207ca4fc252fa9d778ca0b13a3c95e0
branch: master
author: Victor Stinner <vstinner(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-04-29T21:28:51-04:00
summary:
bpo-40443: Remove unused imports in idlelib (GH-19801)
files:
M Lib/idlelib/autocomplete_w.py
M Lib/idlelib/config_key.py
M Lib/idlelib/configdialog.py
M Lib/idlelib/idle_test/test_sidebar.py
M Lib/idlelib/idle_test/…
[View More]test_squeezer.py
M Lib/idlelib/textview.py
diff --git a/Lib/idlelib/autocomplete_w.py b/Lib/idlelib/autocomplete_w.py
index 0643c092c6e54..fe7a6be83d586 100644
--- a/Lib/idlelib/autocomplete_w.py
+++ b/Lib/idlelib/autocomplete_w.py
@@ -4,7 +4,7 @@
import platform
from tkinter import *
-from tkinter.ttk import Frame, Scrollbar
+from tkinter.ttk import Scrollbar
from idlelib.autocomplete import FILES, ATTRS
from idlelib.multicall import MC_SHIFT
diff --git a/Lib/idlelib/config_key.py b/Lib/idlelib/config_key.py
index 4478323fcc2c5..7510aa9f3d878 100644
--- a/Lib/idlelib/config_key.py
+++ b/Lib/idlelib/config_key.py
@@ -1,7 +1,7 @@
"""
Dialog for building Tkinter accelerator key bindings
"""
-from tkinter import Toplevel, Listbox, Text, StringVar, TclError
+from tkinter import Toplevel, Listbox, StringVar, TclError
from tkinter.ttk import Frame, Button, Checkbutton, Entry, Label, Scrollbar
from tkinter import messagebox
import string
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index 9d5c2cde04b24..82596498d3461 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -11,7 +11,7 @@
"""
import re
-from tkinter import (Toplevel, Listbox, Text, Scale, Canvas,
+from tkinter import (Toplevel, Listbox, Scale, Canvas,
StringVar, BooleanVar, IntVar, TRUE, FALSE,
TOP, BOTTOM, RIGHT, LEFT, SOLID, GROOVE,
NONE, BOTH, X, Y, W, E, EW, NS, NSEW, NW,
diff --git a/Lib/idlelib/idle_test/test_sidebar.py b/Lib/idlelib/idle_test/test_sidebar.py
index 0f5b4c7122324..2974a9a7b0987 100644
--- a/Lib/idlelib/idle_test/test_sidebar.py
+++ b/Lib/idlelib/idle_test/test_sidebar.py
@@ -1,6 +1,5 @@
"""Test sidebar, coverage 93%"""
import idlelib.sidebar
-from sys import platform
from itertools import chain
import unittest
import unittest.mock
diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py
index 1af2ce832845c..e3912f4bbbec8 100644
--- a/Lib/idlelib/idle_test/test_squeezer.py
+++ b/Lib/idlelib/idle_test/test_squeezer.py
@@ -1,6 +1,5 @@
"Test squeezer, coverage 95%"
-from collections import namedtuple
from textwrap import dedent
from tkinter import Text, Tk
import unittest
diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py
index 808a2aefab4f7..a66c1a4309a61 100644
--- a/Lib/idlelib/textview.py
+++ b/Lib/idlelib/textview.py
@@ -6,7 +6,6 @@
from tkinter.ttk import Frame, Scrollbar, Button
from tkinter.messagebox import showerror
-from functools import update_wrapper
from idlelib.colorizer import color_config
[View Less]
1
0

April 30, 2020
https://github.com/python/cpython/commit/138a9b9c2a394f30f222c23391f9515a7d…
commit: 138a9b9c2a394f30f222c23391f9515a7df9d809
branch: master
author: Vlad Serebrennikov <brainvlad(a)gmail.com>
committer: GitHub <noreply(a)github.com>
date: 2020-04-29T18:06:39-07:00
summary:
bpo-40389: Improve repr of typing.Optional (#19714)
files:
A Misc/NEWS.d/next/Library/2020-04-25-20-00-58.bpo-40389.FPA6f0.rst
M Lib/test/test_dataclasses.py
M Lib/test/test_typing.py
M Lib/typing.py
diff --git …
[View More]a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index e8fe455fc19b4..b20103bdce51c 100644
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -2028,7 +2028,7 @@ def test_docstring_one_field_with_default_none(self):
class C:
x: Union[int, type(None)] = None
- self.assertDocStrEqual(C.__doc__, "C(x:Union[int, NoneType]=None)")
+ self.assertDocStrEqual(C.__doc__, "C(x:Optional[int]=None)")
def test_docstring_list_field(self):
@dataclass
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index cab8de0f5efb2..21bc7c81f2a30 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -1750,7 +1750,7 @@ def test_extended_generic_rules_repr(self):
self.assertEqual(repr(Union[Tuple, Tuple[int]]).replace('typing.', ''),
'Union[Tuple, Tuple[int]]')
self.assertEqual(repr(Callable[..., Optional[T]][int]).replace('typing.', ''),
- 'Callable[..., Union[int, NoneType]]')
+ 'Callable[..., Optional[int]]')
self.assertEqual(repr(Callable[[], List[T]][int]).replace('typing.', ''),
'Callable[[], List[int]]')
diff --git a/Lib/typing.py b/Lib/typing.py
index c82989861927d..f3cd280a09e27 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -691,6 +691,13 @@ def copy_with(self, params):
return _GenericAlias(self.__origin__, params, name=self._name, inst=self._inst)
def __repr__(self):
+ if (self.__origin__ == Union and len(self.__args__) == 2
+ and type(None) in self.__args__):
+ if self.__args__[0] is not type(None):
+ arg = self.__args__[0]
+ else:
+ arg = self.__args__[1]
+ return (f'typing.Optional[{_type_repr(arg)}]')
if (self._name != 'Callable' or
len(self.__args__) == 2 and self.__args__[0] is Ellipsis):
if self._name:
diff --git a/Misc/NEWS.d/next/Library/2020-04-25-20-00-58.bpo-40389.FPA6f0.rst b/Misc/NEWS.d/next/Library/2020-04-25-20-00-58.bpo-40389.FPA6f0.rst
new file mode 100644
index 0000000000000..e7a60a8d5f6f4
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-04-25-20-00-58.bpo-40389.FPA6f0.rst
@@ -0,0 +1 @@
+``repr()`` now returns ``typing.Optional[T]`` when called for ``typing.Union`` of two types, one of which is ``NoneType``.
\ No newline at end of file
[View Less]
1
0

April 30, 2020
https://github.com/python/cpython/commit/b1e11c31c523dc082985e9de779ceeb472…
commit: b1e11c31c523dc082985e9de779ceeb47224e536
branch: master
author: Victor Stinner <vstinner(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-04-30T02:21:30+02:00
summary:
bpo-40443: Remove unused imports in tests (GH-19804)
files:
M Lib/distutils/tests/test_build_clib.py
M Lib/distutils/tests/test_config_cmd.py
M Lib/distutils/tests/test_dist.py
M Lib/distutils/tests/test_spawn.py
M …
[View More]Lib/test/test_array.py
M Lib/test/test_asyncio/test_base_events.py
M Lib/test/test_asyncio/test_server.py
M Lib/test/test_asyncio/test_sslproto.py
M Lib/test/test_call.py
M Lib/test/test_code.py
M Lib/test/test_compileall.py
M Lib/test/test_flufl.py
M Lib/test/test_fractions.py
M Lib/test/test_fstring.py
M Lib/test/test_hashlib.py
M Lib/test/test_ipaddress.py
M Lib/test/test_logging.py
M Lib/test/test_named_expressions.py
diff --git a/Lib/distutils/tests/test_build_clib.py b/Lib/distutils/tests/test_build_clib.py
index 85d09906f228d..abd8313770ef7 100644
--- a/Lib/distutils/tests/test_build_clib.py
+++ b/Lib/distutils/tests/test_build_clib.py
@@ -8,7 +8,6 @@
from distutils.command.build_clib import build_clib
from distutils.errors import DistutilsSetupError
from distutils.tests import support
-from distutils.spawn import find_executable
class BuildCLibTestCase(support.TempdirManager,
support.LoggingSilencer,
diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py
index 8bd2c94237846..9aeab07b46836 100644
--- a/Lib/distutils/tests/test_config_cmd.py
+++ b/Lib/distutils/tests/test_config_cmd.py
@@ -39,7 +39,6 @@ def test_dump_file(self):
@unittest.skipIf(sys.platform == 'win32', "can't test on Windows")
def test_search_cpp(self):
- import shutil
cmd = missing_compiler_executable(['preprocessor'])
if cmd is not None:
self.skipTest('The %r command is not found' % cmd)
diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py
index cc34725a99efa..60956dadef234 100644
--- a/Lib/distutils/tests/test_dist.py
+++ b/Lib/distutils/tests/test_dist.py
@@ -8,7 +8,7 @@
from unittest import mock
-from distutils.dist import Distribution, fix_help_options, DistributionMetadata
+from distutils.dist import Distribution, fix_help_options
from distutils.cmd import Command
from test.support import (
diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py
index 73b0f5cb7324c..cf1faad5f4dd5 100644
--- a/Lib/distutils/tests/test_spawn.py
+++ b/Lib/distutils/tests/test_spawn.py
@@ -2,8 +2,7 @@
import os
import stat
import sys
-import unittest
-from unittest import mock
+import unittest.mock
from test.support import run_unittest, unix_shell
from test import support as test_support
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 5f612fba8a497..f731b70415e7f 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -10,7 +10,6 @@
import operator
import struct
import sys
-import warnings
import array
from array import _array_reconstructor as array_reconstructor
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 4adcbf46cc9eb..533d5cc7f5038 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -3,7 +3,6 @@
import concurrent.futures
import errno
import math
-import os
import socket
import sys
import threading
diff --git a/Lib/test/test_asyncio/test_server.py b/Lib/test/test_asyncio/test_server.py
index 006ead29562cf..2de4dcad17c8e 100644
--- a/Lib/test/test_asyncio/test_server.py
+++ b/Lib/test/test_asyncio/test_server.py
@@ -3,7 +3,6 @@
import threading
import unittest
-from test import support
from test.support import socket_helper
from test.test_asyncio import utils as test_utils
from test.test_asyncio import functional as func_tests
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index c716eacfaf1c0..948820c82f3bf 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -2,7 +2,6 @@
import logging
import socket
-import sys
from test import support
import unittest
import weakref
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index b3077ad1d1cb8..451a7170c304d 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -1,4 +1,3 @@
-import datetime
import unittest
from test.support import cpython_only
try:
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 7bb824ea31dac..ac3dde745603d 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -130,7 +130,6 @@
import threading
import unittest
import weakref
-import opcode
try:
import ctypes
except ImportError:
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
index cb59fd71b3825..72678945089f2 100644
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -11,7 +11,6 @@
import time
import unittest
import io
-import errno
from unittest import mock, skipUnless
try:
diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py
index b71442804c72b..22285859a92bb 100644
--- a/Lib/test/test_flufl.py
+++ b/Lib/test/test_flufl.py
@@ -1,6 +1,5 @@
import __future__
import unittest
-import sys
from test import support
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index c748533c79129..0845f7921c39e 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -9,7 +9,6 @@
import functools
import sys
import unittest
-import warnings
from copy import copy, deepcopy
from pickle import dumps, loads
F = fractions.Fraction
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index 4c240f34a3543..fe465b7e1d43d 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -10,9 +10,7 @@
import ast
import types
import decimal
-import sys
import unittest
-from test import support
a_global = 'global variable'
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 31d8e5567639c..f9fe7e37920a3 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -8,7 +8,6 @@
import array
from binascii import unhexlify
-import functools
import hashlib
import importlib
import itertools
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
index bbb3fc89da653..6d5814c9774a0 100644
--- a/Lib/test/test_ipaddress.py
+++ b/Lib/test/test_ipaddress.py
@@ -7,7 +7,6 @@
import unittest
import re
import contextlib
-import functools
import operator
import pickle
import ipaddress
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index e1d0eb8145fe2..4cc45f7107115 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -36,7 +36,6 @@
import queue
import random
import re
-import signal
import socket
import struct
import sys
diff --git a/Lib/test/test_named_expressions.py b/Lib/test/test_named_expressions.py
index 3ae557f78d273..c813830ce6d3c 100644
--- a/Lib/test/test_named_expressions.py
+++ b/Lib/test/test_named_expressions.py
@@ -1,4 +1,3 @@
-import os
import unittest
GLOBAL_VAR = None
[View Less]
1
0

April 29, 2020
https://github.com/python/cpython/commit/57572b103ebd8732ac21922f0051a7f140…
commit: 57572b103ebd8732ac21922f0051a7f140d0e405
branch: master
author: Victor Stinner <vstinner(a)python.org>
committer: GitHub <noreply(a)github.com>
date: 2020-04-30T01:48:37+02:00
summary:
bpo-40443: Remove unused imports in tests (GH-19805)
files:
M Lib/test/test_parser.py
M Lib/test/test_peg_parser.py
M Lib/test/test_platform.py
M Lib/test/test_positional_only_arg.py
M Lib/test/test_pstats.py
M Lib/…
[View More]test/test_re.py
M Lib/test/test_regrtest.py
M Lib/test/test_string_literals.py
M Lib/test/test_support.py
M Lib/test/test_syntax.py
M Lib/test/test_tempfile.py
M Lib/test/test_tools/test_c_analyzer/test_parser/test_preprocessor.py
M Lib/test/test_tools/test_lll.py
M Lib/test/test_tools/test_pathfix.py
M Lib/test/test_typing.py
M Lib/test/test_unparse.py
M Lib/test/test_uuid.py
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index fd33d6529b144..a4d2cdc090aa2 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -8,7 +8,6 @@
import unittest
import operator
import struct
-import sys
from test import support
from test.support.script_helper import assert_python_failure
from test.support.script_helper import assert_python_ok
diff --git a/Lib/test/test_peg_parser.py b/Lib/test/test_peg_parser.py
index 43d30bae84984..191494481eb0a 100644
--- a/Lib/test/test_peg_parser.py
+++ b/Lib/test/test_peg_parser.py
@@ -1,9 +1,6 @@
import ast
-import os
-import sys
import _peg_parser as peg_parser
import unittest
-from pathlib import PurePath
from typing import Any, Union, Iterable, Tuple
from textwrap import dedent
from test import support
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 998f1e0dc315a..7664b38a720a7 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -3,7 +3,6 @@
import subprocess
import sys
import unittest
-import collections
from unittest import mock
from test import support
diff --git a/Lib/test/test_positional_only_arg.py b/Lib/test/test_positional_only_arg.py
index 4d5fb6bc6112c..f7bd401804364 100644
--- a/Lib/test/test_positional_only_arg.py
+++ b/Lib/test/test_positional_only_arg.py
@@ -3,7 +3,6 @@
import dis
import pickle
import unittest
-import sys
from test.support import check_syntax_error, use_old_parser
diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py
index f3a6e586c3bcc..10559deb6bcb2 100644
--- a/Lib/test/test_pstats.py
+++ b/Lib/test/test_pstats.py
@@ -5,7 +5,6 @@
from pstats import SortKey
import pstats
-import time
import cProfile
class AddCallersTestCase(unittest.TestCase):
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 4817d761a22df..1bfbcb853c4ed 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -2217,7 +2217,7 @@ def test_re_benchmarks(self):
def test_re_tests(self):
're_tests test suite'
- from test.re_tests import tests, SUCCEED, FAIL, SYNTAX_ERROR
+ from test.re_tests import tests, FAIL, SYNTAX_ERROR
for t in tests:
pattern = s = outcome = repl = expected = None
if len(t) == 5:
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 93f8d44ec6938..de209da41a34d 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -5,7 +5,6 @@
"""
import contextlib
-import faulthandler
import glob
import io
import os.path
diff --git a/Lib/test/test_string_literals.py b/Lib/test/test_string_literals.py
index 5a2fb8b372f8c..5b5477d14d467 100644
--- a/Lib/test/test_string_literals.py
+++ b/Lib/test/test_string_literals.py
@@ -33,7 +33,7 @@
import tempfile
import unittest
import warnings
-from test.support import check_syntax_warning, use_old_parser
+from test.support import use_old_parser
TEMPLATE = r"""# coding: %s
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 606e57003ed71..b5a16f9cb6027 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -1,4 +1,3 @@
-import contextlib
import errno
import importlib
import io
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index aff8dd72b78d4..e7468cae7b132 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -644,7 +644,6 @@
"""
import re
-import sys
import unittest
from test import support
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 69d5de2e1b95f..fcc706ede5aaa 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -4,7 +4,6 @@
import io
import os
import pathlib
-import signal
import sys
import re
import warnings
diff --git a/Lib/test/test_tools/test_c_analyzer/test_parser/test_preprocessor.py b/Lib/test/test_tools/test_c_analyzer/test_parser/test_preprocessor.py
index 56a1c9c612f72..b7f950f813976 100644
--- a/Lib/test/test_tools/test_c_analyzer/test_parser/test_preprocessor.py
+++ b/Lib/test/test_tools/test_c_analyzer/test_parser/test_preprocessor.py
@@ -1,4 +1,3 @@
-import itertools
import textwrap
import unittest
import sys
diff --git a/Lib/test/test_tools/test_lll.py b/Lib/test/test_tools/test_lll.py
index b01e2188e1cf2..568cbfb5e4746 100644
--- a/Lib/test/test_tools/test_lll.py
+++ b/Lib/test/test_tools/test_lll.py
@@ -1,7 +1,6 @@
"""Tests for the lll script in the Tools/script directory."""
import os
-import sys
import tempfile
from test import support
from test.test_tools import skip_if_missing, import_tool
diff --git a/Lib/test/test_tools/test_pathfix.py b/Lib/test/test_tools/test_pathfix.py
index ec361178e6d81..8b4193073408b 100644
--- a/Lib/test/test_tools/test_pathfix.py
+++ b/Lib/test/test_tools/test_pathfix.py
@@ -3,7 +3,7 @@
import sys
import unittest
from test import support
-from test.test_tools import import_tool, scriptsdir, skip_if_missing
+from test.test_tools import scriptsdir, skip_if_missing
# need Tools/script/ directory: skip if run on Python installed on the system
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index f191d3bb9e90c..cab8de0f5efb2 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -3,7 +3,7 @@
import pickle
import re
import sys
-from unittest import TestCase, main, skipUnless, SkipTest, skip
+from unittest import TestCase, main, skipUnless, skip
from copy import copy, deepcopy
from typing import Any, NoReturn
diff --git a/Lib/test/test_unparse.py b/Lib/test/test_unparse.py
index 3bacd672d4462..b913569585a21 100644
--- a/Lib/test/test_unparse.py
+++ b/Lib/test/test_unparse.py
@@ -6,7 +6,6 @@
import random
import tokenize
import ast
-import sys
def read_pyfile(filename):
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index 0b267f4a97861..ac166ced38afb 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -6,8 +6,6 @@
import io
import os
import pickle
-import shutil
-import subprocess
import sys
import weakref
from unittest import mock
[View Less]
1
0

bpo-40334: Fix test_peg_parser to actually use the old parser (GH-19778)
by Lysandros Nikolaou April 29, 2020
by Lysandros Nikolaou April 29, 2020
April 29, 2020
https://github.com/python/cpython/commit/69e802ed812e38cb68a4ab74af64b4f719…
commit: 69e802ed812e38cb68a4ab74af64b4f719b6cc78
branch: master
author: Lysandros Nikolaou <lisandrosnik(a)gmail.com>
committer: GitHub <noreply(a)github.com>
date: 2020-04-29T23:53:30+01:00
summary:
bpo-40334: Fix test_peg_parser to actually use the old parser (GH-19778)
Now that the default parser is the new PEG parser, ast.parse uses it, which means that we don't actually test something in …
[View More]test_peg_parser. This commit introduces a new keyword argument (`oldparser`) for `_peg_parser.parse_string` for specifying that a string needs to be parsed with the old parser. This keyword argument is used in the tests to actually compare the ASTs the new parser generates with those generated by the old parser.
files:
M Lib/test/test_peg_parser.py
M Modules/_peg_parser.c
diff --git a/Lib/test/test_peg_parser.py b/Lib/test/test_peg_parser.py
index ea4afa6e17973..43d30bae84984 100644
--- a/Lib/test/test_peg_parser.py
+++ b/Lib/test/test_peg_parser.py
@@ -699,7 +699,7 @@ def test_correct_ast_generation_on_source_files(self) -> None:
self.maxDiff = None
for source in TEST_SOURCES:
actual_ast = peg_parser.parse_string(source)
- expected_ast = ast.parse(source)
+ expected_ast = peg_parser.parse_string(source, oldparser=True)
self.assertEqual(
ast.dump(actual_ast, include_attributes=True),
ast.dump(expected_ast, include_attributes=True),
@@ -721,12 +721,11 @@ def test_incorrect_ast_generation_with_specialized_errors(self) -> None:
f"Actual error message does not match expexted for {source}"
)
- @support.skip_if_new_parser("This tests nothing for now, since compile uses pegen as well")
@unittest.expectedFailure
def test_correct_but_known_to_fail_ast_generation_on_source_files(self) -> None:
for source in GOOD_BUT_FAIL_SOURCES:
actual_ast = peg_parser.parse_string(source)
- expected_ast = ast.parse(source)
+ expected_ast = peg_parser.parse_string(source, oldparser=True)
self.assertEqual(
ast.dump(actual_ast, include_attributes=True),
ast.dump(expected_ast, include_attributes=True),
@@ -736,7 +735,7 @@ def test_correct_but_known_to_fail_ast_generation_on_source_files(self) -> None:
def test_correct_ast_generation_without_pos_info(self) -> None:
for source in GOOD_BUT_FAIL_SOURCES:
actual_ast = peg_parser.parse_string(source)
- expected_ast = ast.parse(source)
+ expected_ast = peg_parser.parse_string(source, oldparser=True)
self.assertEqual(
ast.dump(actual_ast),
ast.dump(expected_ast),
@@ -752,7 +751,7 @@ def test_fstring_parse_error_tracebacks(self) -> None:
def test_correct_ast_generatrion_eval(self) -> None:
for source in EXPRESSIONS_TEST_SOURCES:
actual_ast = peg_parser.parse_string(source, mode='eval')
- expected_ast = ast.parse(source, mode='eval')
+ expected_ast = peg_parser.parse_string(source, mode='eval', oldparser=True)
self.assertEqual(
ast.dump(actual_ast, include_attributes=True),
ast.dump(expected_ast, include_attributes=True),
diff --git a/Modules/_peg_parser.c b/Modules/_peg_parser.c
index e1ec36e07bd57..59b80f9e06e9e 100644
--- a/Modules/_peg_parser.c
+++ b/Modules/_peg_parser.c
@@ -45,11 +45,13 @@ _Py_parse_file(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *
_Py_parse_string(PyObject *self, PyObject *args, PyObject *kwds)
{
- static char *keywords[] = {"string", "mode", NULL};
+ static char *keywords[] = {"string", "mode", "oldparser", NULL};
char *the_string;
char *mode_str = "exec";
+ int oldparser = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|s", keywords, &the_string, &mode_str)) {
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|sp", keywords,
+ &the_string, &mode_str, &oldparser)) {
return NULL;
}
@@ -77,7 +79,13 @@ _Py_parse_string(PyObject *self, PyObject *args, PyObject *kwds)
PyCompilerFlags flags = _PyCompilerFlags_INIT;
flags.cf_flags = PyCF_IGNORE_COOKIE;
- mod_ty res = PyPegen_ASTFromString(the_string, mode, &flags, arena);
+ mod_ty res;
+ if (oldparser) {
+ res = PyParser_ASTFromString(the_string, "<string>", mode, &flags, arena);
+ }
+ else {
+ res = PyPegen_ASTFromString(the_string, mode, &flags, arena);
+ }
if (res == NULL) {
goto error;
}
[View Less]
1
0
To: python-checkins(a)python.org
Subject: Post 3.8.3rc1
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/e07fb669e9ed6cf75e241209f0547c2c2f…
7ef7
commit: e07fb669e9ed6cf75e241209f0547c2c2f7d7ef7
branch: 3.8
author: =C5=81ukasz Langa <lukasz(a)langa.pl>
committer: =C5=81ukasz Langa <lukasz(a)langa.pl>
date: 2020-04-30T00:43:53+02:00
summary:
Post 3.8.3rc1
files:
M Include/patchlevel.h
…
[View More]diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index bc825c0a188b8..f3c412bf8dd8e 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -23,7 +23,7 @@
#define PY_RELEASE_SERIAL 1
=20
/* Version as a string */
-#define PY_VERSION "3.8.3rc1"
+#define PY_VERSION "3.8.3rc1+"
/*--end constants--*/
=20
/* Version as a single 4-byte hex number, e.g. 0x010502B2 =3D=3D 1.5.2b2.
[View Less]
1
0
To: python-checkins(a)python.org
Subject: Python 3.8.3rc1
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/802eb676bad7a2558fdf35a8ea5882f5e9…
2ad8
commit: 802eb676bad7a2558fdf35a8ea5882f5e97c2ad8
branch: 3.8
author: =C5=81ukasz Langa <lukasz(a)langa.pl>
committer: =C5=81ukasz Langa <lukasz(a)langa.pl>
date: 2020-04-29T19:21:55+02:00
summary:
Python 3.8.3rc1
files:
A Misc/NEWS.d/3.8.…
[View More]3rc1.rst
D Misc/NEWS.d/next/Build/2020-03-28-10-43-09.bpo-38527.fqCRgD.rst
D Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
D Misc/NEWS.d/next/Build/2020-04-09-00-19-10.bpo-40204.K-S6RZ.rst
D Misc/NEWS.d/next/Build/2020-04-22-02-33-54.bpo-38360.74C68u.rst
D Misc/NEWS.d/next/C API/2020-02-25-20-10-34.bpo-38913.siF1lS.rst
D Misc/NEWS.d/next/C API/2020-03-08-22-56-22.bpo-38643.k2ixx6.rst
D Misc/NEWS.d/next/C API/2020-03-12-00-27-26.bpo-39884.CGOJBO.rst
D Misc/NEWS.d/next/C API/2020-03-13-16-44-23.bpo-35370.sXRA-r.rst
D Misc/NEWS.d/next/Core and Builtins/2018-09-23-16-32-58.bpo-22490.8e0YDf.rst
D Misc/NEWS.d/next/Core and Builtins/2020-02-02-00-12-07.bpo-39520.uicBq6.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-02-19-21-21.bpo-39778._YGLEc.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-06-06-12-37.bpo-39871.dCAj_2.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-06-21-04-39.bpo-38894.nfcGKv.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-12-22-13-50.bpo-39562.E2u273.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-15-03-52-01.bpo-39965.Od3ZdP.rst
D Misc/NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-20526.NHNZIv.rst
D Misc/NEWS.d/next/Documentation/2019-10-06-23-44-15.bpo-38387.fZoq0S.rst
D Misc/NEWS.d/next/Documentation/2020-02-18-14-28-31.bpo-39677.vNHqoX.rst
D Misc/NEWS.d/next/Documentation/2020-02-21-22-05-20.bpo-39718.xtBoSi.rst
D Misc/NEWS.d/next/Documentation/2020-02-23-13-26-40.bpo-39530._bCvzQ.rst
D Misc/NEWS.d/next/Documentation/2020-02-27-17-35-27.bpo-17422.eS1hVh.rst
D Misc/NEWS.d/next/Documentation/2020-02-28-14-39-25.bpo-13790.hvLaRI.rst
D Misc/NEWS.d/next/Documentation/2020-03-05-16-29-03.bpo-39868.JQoHhO.rst
D Misc/NEWS.d/next/Documentation/2020-03-16-18-12-02.bpo-39879.CnQ7Cv.rst
D Misc/NEWS.d/next/Documentation/2020-04-01-00-27-03.bpo-27635.VwxUty.rst
D Misc/NEWS.d/next/IDLE/2019-11-14-12-59-19.bpo-38689.Lgfxva.rst
D Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
D Misc/NEWS.d/next/IDLE/2020-02-27-22-17-09.bpo-39781.bbYBeL.rst
D Misc/NEWS.d/next/IDLE/2020-03-06-01-55-14.bpo-39852.QjA1qF.rst
D Misc/NEWS.d/next/IDLE/2020-03-08-14-27-36.bpo-39885.29ERiR.rst
D Misc/NEWS.d/next/IDLE/2020-03-09-02-45-12.bpo-27115.8hSHMo.rst
D Misc/NEWS.d/next/Library/2017-10-14-21-02-40.bpo-31758.563ZZb.rst
D Misc/NEWS.d/next/Library/2019-06-18-19-38-27.bpo-36541.XI8mi1.rst
D Misc/NEWS.d/next/Library/2019-10-09-08-14-25.bpo-38410._YyoMV.rst
D Misc/NEWS.d/next/Library/2019-12-20-16-06-28.bpo-38971.fKRYlF.rst
D Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rst
D Misc/NEWS.d/next/Library/2020-02-17-22-38-15.bpo-39667.QuzEHH.rst
D Misc/NEWS.d/next/Library/2020-02-24-03-45-28.bpo-30566.qROxty.rst
D Misc/NEWS.d/next/Library/2020-02-27-18-21-07.bpo-39764.wqPk68.rst
D Misc/NEWS.d/next/Library/2020-02-29-11-20-50.bpo-39517.voQZb8.rst
D Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst
D Misc/NEWS.d/next/Library/2020-02-29-19-17-39.bpo-39794.7VjatS.rst
D Misc/NEWS.d/next/Library/2020-03-04-16-10-59.bpo-13487.gqe4Fb.rst
D Misc/NEWS.d/next/Library/2020-03-05-00-57-49.bpo-39828.yWq9NJ.rst
D Misc/NEWS.d/next/Library/2020-03-09-01-45-06.bpo-39850.eaJNIE.rst
D Misc/NEWS.d/next/Library/2020-03-09-18-56-27.bpo-39916.BHHyp3.rst
D Misc/NEWS.d/next/Library/2020-03-10-15-32-31.bpo-38662.o1DMXj.rst
D Misc/NEWS.d/next/Library/2020-03-10-19-38-47.bpo-39915.CjPeiY.rst
D Misc/NEWS.d/next/Library/2020-03-11-23-08-25.bpo-39652.gbasrk.rst
D Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst
D Misc/NEWS.d/next/Library/2020-03-19-16-33-03.bpo-39953.yy5lC_.rst
D Misc/NEWS.d/next/Library/2020-03-19-19-40-27.bpo-40016.JWtxqJ.rst
D Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
D Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst
D Misc/NEWS.d/next/Library/2020-03-27-17-22-34.bpo-40089.-lFsD0.rst
D Misc/NEWS.d/next/Library/2020-04-04-00-47-40.bpo-40126.Y-bTNP.rst
D Misc/NEWS.d/next/Library/2020-04-06-11-05-13.bpo-40196.Jqowse.rst
D Misc/NEWS.d/next/Library/2020-04-12-21-18-56.bpo-40260.F6VWaE.rst
D Misc/NEWS.d/next/Library/2020-04-15-17-21-48.bpo-40287.-mkEJH.rst
D Misc/NEWS.d/next/Library/2020-04-19-17-31-29.bpo-40330.DGjoIS.rst
D Misc/NEWS.d/next/Library/2020-04-20-20-16-02.bpo-39942.NvGnTc.rst
D Misc/NEWS.d/next/Library/2020-04-22-00-05-10.bpo-40138.i_oGqa.rst
D Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst
D Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
D Misc/NEWS.d/next/Security/2020-03-30-23-16-25.bpo-40121.p2LIio.rst
D Misc/NEWS.d/next/Tests/2019-10-17-00-49-38.bpo-38502.vUEic7.rst
D Misc/NEWS.d/next/Tests/2019-10-30-00-01-43.bpo-37957.X1r78F.rst
D Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst
D Misc/NEWS.d/next/Tests/2020-02-29-12-58-17.bpo-39793.Og2SUN.rst
D Misc/NEWS.d/next/Tests/2020-03-18-16-04-33.bpo-27807.9gKjET.rst
D Misc/NEWS.d/next/Tests/2020-03-20-00-30-36.bpo-40019.zOqHpQ.rst
D Misc/NEWS.d/next/Tests/2020-04-02-02-14-37.bpo-40146.J-Yo9G.rst
D Misc/NEWS.d/next/Tests/2020-04-03-02-40-16.bpo-40162.v3pQW_.rst
D Misc/NEWS.d/next/Tests/2020-04-29-16-08-24.bpo-40436.gDMnYl.rst
D Misc/NEWS.d/next/Tools-Demos/2020-03-07-18-01-30.bpo-39889.l1czT6.rst
D Misc/NEWS.d/next/Tools-Demos/2020-03-09-13-28-13.bpo-36184.BMPJ0D.rst
D Misc/NEWS.d/next/Tools-Demos/2020-04-04-19-35-22.bpo-40179.u9FH10.rst
D Misc/NEWS.d/next/Windows/2020-02-25-18-43-34.bpo-34803.S3VcS0.rst
D Misc/NEWS.d/next/Windows/2020-02-28-22-46-09.bpo-39789.67XRoP.rst
D Misc/NEWS.d/next/Windows/2020-02-28-23-51-27.bpo-38380.TpOBCj.rst
D Misc/NEWS.d/next/Windows/2020-03-01-15-04-54.bpo-38597.MnHdYl.rst
D Misc/NEWS.d/next/Windows/2020-03-04-17-05-11.bpo-39847.C3N2m3.rst
D Misc/NEWS.d/next/Windows/2020-03-11-10-15-56.bpo-39930.LGHw1j.rst
D Misc/NEWS.d/next/Windows/2020-04-04-13-13-44.bpo-40164.SPrSn5.rst
D Misc/NEWS.d/next/macOS/2020-02-28-23-51-47.bpo-38380.u-ySyA.rst
D Misc/NEWS.d/next/macOS/2020-04-21-19-46-35.bpo-40164.6HA6IC.rst
M Include/patchlevel.h
M Lib/pydoc_data/topics.py
M README.rst
diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index affbd82a70976..bc825c0a188b8 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 8
-#define PY_MICRO_VERSION 2
-#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
-#define PY_RELEASE_SERIAL 0
+#define PY_MICRO_VERSION 3
+#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
+#define PY_RELEASE_SERIAL 1
=20
/* Version as a string */
-#define PY_VERSION "3.8.2+"
+#define PY_VERSION "3.8.3rc1"
/*--end constants--*/
=20
/* Version as a single 4-byte hex number, e.g. 0x010502B2 =3D=3D 1.5.2b2.
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index f1fdb7fc8617c..ba068f0b2b9f7 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Mon Feb 24 21:52:17 2020
+# Autogenerated by Sphinx on Wed Apr 29 19:18:01 2020
topics =3D {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@@ -1475,8 +1475,8 @@
' | starred_and_keywords ["," '
'keywords_arguments]\n'
' | keywords_arguments\n'
- ' positional_arguments ::=3D ["*"] expression ("," ["*"] '
- 'expression)*\n'
+ ' positional_arguments ::=3D positional_item ("," positional_ite=
m)*\n'
+ ' positional_item ::=3D assignment_expression | "*" express=
ion\n'
' starred_and_keywords ::=3D ("*" expression | keyword_item)\n'
' ("," "*" expression | "," '
'keyword_item)*\n'
@@ -1872,9 +1872,9 @@
' value is false. A counter-intuitive implication is that '
'not-a-number\n'
' values are not equal to themselves. For example, if "x =
=3D\n'
- ' float(\'NaN\')", "3 < x", "x < 3", "x =3D=3D x", "x !=3D =
x" are '
- 'all false.\n'
- ' This behavior is compliant with IEEE 754.\n'
+ ' float(\'NaN\')", "3 < x", "x < 3" and "x =3D=3D x" are al=
l '
+ 'false, while "x\n'
+ ' !=3D x" is true. This behavior is compliant with IEEE 75=
4.\n'
'\n'
'* "None" and "NotImplemented" are singletons. **PEP 8** '
'advises\n'
@@ -2186,8 +2186,8 @@
'\n'
'The "if" statement is used for conditional execution:\n'
'\n'
- ' if_stmt ::=3D "if" expression ":" suite\n'
- ' ("elif" expression ":" suite)*\n'
+ ' if_stmt ::=3D "if" assignment_expression ":" suite\n'
+ ' ("elif" assignment_expression ":" suite)*\n'
' ["else" ":" suite]\n'
'\n'
'It selects exactly one of the suites by evaluating the '
@@ -2210,7 +2210,7 @@
'an\n'
'expression is true:\n'
'\n'
- ' while_stmt ::=3D "while" expression ":" suite\n'
+ ' while_stmt ::=3D "while" assignment_expression ":" suite\n'
' ["else" ":" suite]\n'
'\n'
'This repeatedly tests the expression and, if it is true, '
@@ -3136,7 +3136,7 @@
'\n'
'When a description of an arithmetic operator below uses the=
'
'phrase\n'
- '=E2=80=9Cthe numeric arguments are converted to a common ty=
pe,=E2=80=9D this '
+ '=E2=80=9Cthe numeric arguments are converted to a common ty=
pe=E2=80=9D, this '
'means\n'
'that the operator implementation for built-in types works a=
s '
'follows:\n'
@@ -4402,8 +4402,8 @@
'\n'
'The "if" statement is used for conditional execution:\n'
'\n'
- ' if_stmt ::=3D "if" expression ":" suite\n'
- ' ("elif" expression ":" suite)*\n'
+ ' if_stmt ::=3D "if" assignment_expression ":" suite\n'
+ ' ("elif" assignment_expression ":" suite)*\n'
' ["else" ":" suite]\n'
'\n'
'It selects exactly one of the suites by evaluating the expressions=
'
@@ -4819,7 +4819,7 @@
'[","]\n'
' starred_expression ::=3D expression | (starred_item ",")* '
'[starred_item]\n'
- ' starred_item ::=3D expression | "*" or_expr\n'
+ ' starred_item ::=3D assignment_expression | "*" or_ex=
pr\n'
'\n'
'Except when part of a list or set display, an expression list=
\n'
'containing at least one comma yields a tuple. The length of '
@@ -5129,11 +5129,11 @@
'only\n'
'supported by the numeric types.\n'
'\n'
- 'A general convention is that an empty format string (""""=
) '
+ 'A general convention is that an empty format specificatio=
n '
'produces\n'
'the same result as if you had called "str()" on the value=
. '
'A non-empty\n'
- 'format string typically modifies the result.\n'
+ 'format specification typically modifies the result.\n'
'\n'
'The general form of a *standard format specifier* is:\n'
'\n'
@@ -5939,19 +5939,18 @@
'convention.\n'
'\n'
'"__*__"\n'
- ' System-defined names. These names are defined by the '
- 'interpreter\n'
- ' and its implementation (including the standard library). =
'
- 'Current\n'
- ' system names are discussed in the Special method names '
- 'section and\n'
- ' elsewhere. More will likely be defined in future version=
s '
- 'of\n'
- ' Python. *Any* use of "__*__" names, in any context, that=
'
- 'does not\n'
- ' follow explicitly documented use, is subject to breakage '
- 'without\n'
- ' warning.\n'
+ ' System-defined names, informally known as =E2=80=9Cdunder=
=E2=80=9D names. '
+ 'These\n'
+ ' names are defined by the interpreter and its '
+ 'implementation\n'
+ ' (including the standard library). Current system names ar=
e\n'
+ ' discussed in the Special method names section and '
+ 'elsewhere. More\n'
+ ' will likely be defined in future versions of Python. *An=
y* '
+ 'use of\n'
+ ' "__*__" names, in any context, that does not follow '
+ 'explicitly\n'
+ ' documented use, is subject to breakage without warning.\n'
'\n'
'"__*"\n'
' Class-private names. Names in this category, when used '
@@ -6087,19 +6086,19 @@
'convention.\n'
'\n'
'"__*__"\n'
- ' System-defined names. These names are defined by the '
- 'interpreter\n'
- ' and its implementation (including the standard library).=
'
- 'Current\n'
- ' system names are discussed in the Special method names '
- 'section and\n'
- ' elsewhere. More will likely be defined in future versio=
ns '
- 'of\n'
- ' Python. *Any* use of "__*__" names, in any context, tha=
t '
- 'does not\n'
- ' follow explicitly documented use, is subject to breakage=
'
- 'without\n'
- ' warning.\n'
+ ' System-defined names, informally known as =E2=80=9Cdunde=
r=E2=80=9D names. '
+ 'These\n'
+ ' names are defined by the interpreter and its '
+ 'implementation\n'
+ ' (including the standard library). Current system names '
+ 'are\n'
+ ' discussed in the Special method names section and '
+ 'elsewhere. More\n'
+ ' will likely be defined in future versions of Python. '
+ '*Any* use of\n'
+ ' "__*__" names, in any context, that does not follow '
+ 'explicitly\n'
+ ' documented use, is subject to breakage without warning.\=
n'
'\n'
'"__*"\n'
' Class-private names. Names in this category, when used '
@@ -6114,8 +6113,8 @@
'\n'
'The "if" statement is used for conditional execution:\n'
'\n'
- ' if_stmt ::=3D "if" expression ":" suite\n'
- ' ("elif" expression ":" suite)*\n'
+ ' if_stmt ::=3D "if" assignment_expression ":" suite\n'
+ ' ("elif" assignment_expression ":" suite)*\n'
' ["else" ":" suite]\n'
'\n'
'It selects exactly one of the suites by evaluating the expressions '
@@ -6984,7 +6983,7 @@
'program is represented by objects or by relations between '
'objects. (In\n'
'a sense, and in conformance to Von Neumann=E2=80=99s model of a=
=E2=80=9Cstored\n'
- 'program computer,=E2=80=9D code is also represented by objects.=
)\n'
+ 'program computer=E2=80=9D, code is also represented by objects.=
)\n'
'\n'
'Every object has an identity, a type and a value. An object=E2=
=80=99s\n'
'*identity* never changes once it has been created; you may thin=
k '
@@ -9012,7 +9011,7 @@
'\n'
'If the metaclass has no "__prepare__" attribute, then the '
'class\n'
- 'namespace is initialised as an empty "dict()".\n'
+ 'namespace is initialised as an empty ordered mapping.\n'
'\n'
'See also:\n'
'\n'
@@ -11432,6 +11431,16 @@
' then they can be used interchangeably to index the same\n'
' dictionary entry.\n'
'\n'
+ ' Dictionaries preserve insertion order, meaning that keys wi=
ll '
+ 'be\n'
+ ' produced in the same order they were added sequentially ove=
r '
+ 'the\n'
+ ' dictionary. Replacing an existing key does not change the '
+ 'order,\n'
+ ' however removing a key and re-inserting it will add it to '
+ 'the\n'
+ ' end instead of keeping its old place.\n'
+ '\n'
' Dictionaries are mutable; they can be created by the "{...}=
"\n'
' notation (see section Dictionary displays).\n'
'\n'
@@ -11440,6 +11449,13 @@
'"collections"\n'
' module.\n'
'\n'
+ ' Changed in version 3.7: Dictionaries did not preserve '
+ 'insertion\n'
+ ' order in versions of Python before 3.6. In CPython 3.6,\n'
+ ' insertion order was preserved, but it was considered an\n'
+ ' implementation detail at that time rather than a language\n'
+ ' guarantee.\n'
+ '\n'
'Callable types\n'
' These are the types to which the function call operation (see\=
n'
' section Calls) can be applied:\n'
@@ -13589,7 +13605,7 @@
'The "while" statement is used for repeated execution as long as a=
n\n'
'expression is true:\n'
'\n'
- ' while_stmt ::=3D "while" expression ":" suite\n'
+ ' while_stmt ::=3D "while" assignment_expression ":" suite\n'
' ["else" ":" suite]\n'
'\n'
'This repeatedly tests the expression and, if it is true, executes=
'
diff --git a/Misc/NEWS.d/3.8.3rc1.rst b/Misc/NEWS.d/3.8.3rc1.rst
new file mode 100644
index 0000000000000..f07bf9072bd61
--- /dev/null
+++ b/Misc/NEWS.d/3.8.3rc1.rst
@@ -0,0 +1,884 @@
+.. bpo: 40121
+.. date: 2020-03-30-23-16-25
+.. nonce: p2LIio
+.. release date: 2020-04-29
+.. section: Security
+
+Fixes audit events raised on creating a new socket.
+
+..
+
+.. bpo: 38576
+.. date: 2020-03-14-14-57-44
+.. nonce: OowwQn
+.. section: Security
+
+Disallow control characters in hostnames in http.client, addressing
+CVE-2019-18348. Such potentially malicious header injection URLs now cause a
+InvalidURL to be raised.
+
+..
+
+.. bpo: 39503
+.. date: 2020-01-30-16-15-29
+.. nonce: B299Yq
+.. section: Security
+
+CVE-2020-8492: The :class:`~urllib.request.AbstractBasicAuthHandler` class
+of the :mod:`urllib.request` module uses an inefficient regular expression
+which can be exploited by an attacker to cause a denial of service. Fix the
+regex to prevent the catastrophic backtracking. Vulnerability reported by
+Ben Caller and Matt Schwager.
+
+..
+
+.. bpo: 20526
+.. date: 2020-03-23-18-08-34
+.. nonce: NHNZIv
+.. section: Core and Builtins
+
+Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is a borrowed
+reference, not a strong reference: ``PyThreadState_Clear()`` must not call
+``Py_CLEAR(tstate->frame)``.
+
+..
+
+.. bpo: 39965
+.. date: 2020-03-15-03-52-01
+.. nonce: Od3ZdP
+.. section: Core and Builtins
+
+Correctly raise ``SyntaxError`` if *await* is used inside non-async
+functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the asyncio
+REPL). Patch by Pablo Galindo.
+
+..
+
+.. bpo: 39562
+.. date: 2020-03-12-22-13-50
+.. nonce: E2u273
+.. section: Core and Builtins
+
+Allow executing asynchronous comprehensions on the top level when the
+``PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag is given. Patch by Batuhan Taskaya.
+
+..
+
+.. bpo: 38894
+.. date: 2020-03-06-21-04-39
+.. nonce: nfcGKv
+.. section: Core and Builtins
+
+Fix a bug that was causing incomplete results when calling
+``pathlib.Path.glob`` in the presence of symlinks that point to files where
+the user does not have read access. Patch by Pablo Galindo and Matt
+Wozniski.
+
+..
+
+.. bpo: 39871
+.. date: 2020-03-06-06-12-37
+.. nonce: dCAj_2
+.. section: Core and Builtins
+
+Fix a possible :exc:`SystemError` in ``math.{atan2,copysign,remainder}()``
+when the first argument cannot be converted to a :class:`float`. Patch by
+Zachary Spytz.
+
+..
+
+.. bpo: 39776
+.. date: 2020-03-02-20-12-33
+.. nonce: fNaxi_
+.. section: Core and Builtins
+
+Fix race condition where threads created by PyGILState_Ensure() could get a
+duplicate id.
+
+This affects consumers of tstate->id like the contextvar caching machinery,
+which could return invalid cached objects under heavy thread load (observed
+in embedded scenarios).
+
+..
+
+.. bpo: 39778
+.. date: 2020-03-02-19-21-21
+.. nonce: _YGLEc
+.. section: Core and Builtins
+
+Fixed a crash due to incorrect handling of weak references in
+``collections.OrderedDict`` classes. Patch by Pablo Galindo.
+
+..
+
+.. bpo: 39520
+.. date: 2020-02-02-00-12-07
+.. nonce: uicBq6
+.. section: Core and Builtins
+
+Fix unparsing of ext slices with no items (``foo[:,]``). Patch by Batuhan
+Taskaya.
+
+..
+
+.. bpo: 22490
+.. date: 2018-09-23-16-32-58
+.. nonce: 8e0YDf
+.. section: Core and Builtins
+
+Don't leak environment variable ``__PYVENV_LAUNCHER__`` into the interpreter
+session on macOS.
+
+..
+
+.. bpo: 40138
+.. date: 2020-04-22-00-05-10
+.. nonce: i_oGqa
+.. section: Library
+
+Fix the Windows implementation of :func:`os.waitpid` for exit code larger
+than ``INT_MAX >> 8``. The exit status is now interpreted as an unsigned
+number.
+
+..
+
+.. bpo: 39942
+.. date: 2020-04-20-20-16-02
+.. nonce: NvGnTc
+.. section: Library
+
+Set "__main__" as the default module name when "__name__" is missing in
+:class:`typing.TypeVar`. Patch by Weipeng Hong.
+
+..
+
+.. bpo: 40330
+.. date: 2020-04-19-17-31-29
+.. nonce: DGjoIS
+.. section: Library
+
+In :meth:`ShareableList.__setitem__`, check the size of a new string item
+after encoding it to utf-8, not before.
+
+..
+
+.. bpo: 40287
+.. date: 2020-04-15-17-21-48
+.. nonce: -mkEJH
+.. section: Library
+
+Fixed ``SpooledTemporaryFile.seek()`` to return the position.
+
+..
+
+.. bpo: 40260
+.. date: 2020-04-12-21-18-56
+.. nonce: F6VWaE
+.. section: Library
+
+Ensure :mod:`modulefinder` uses :func:`io.open_code` and respects coding
+comments.
+
+..
+
+.. bpo: 40196
+.. date: 2020-04-06-11-05-13
+.. nonce: Jqowse
+.. section: Library
+
+Fix a bug in the :mod:`symtable` module that was causing incorrectly report
+global variables as local. Patch by Pablo Galindo.
+
+..
+
+.. bpo: 40126
+.. date: 2020-04-04-00-47-40
+.. nonce: Y-bTNP
+.. section: Library
+
+Fixed reverting multiple patches in unittest.mock. Patcher's ``__exit__()``
+is now never called if its ``__enter__()`` is failed. Returning true from
+``__exit__()`` silences now the exception.
+
+..
+
+.. bpo: 40089
+.. date: 2020-03-27-17-22-34
+.. nonce: -lFsD0
+.. section: Library
+
+Fix threading._after_fork(): if fork was not called by a thread spawned by
+threading.Thread, threading._after_fork() now creates a _MainThread instance
+for _main_thread, instead of a _DummyThread instance.
+
+..
+
+.. bpo: 39503
+.. date: 2020-03-25-16-02-16
+.. nonce: YmMbYn
+.. section: Library
+
+:class:`~urllib.request.AbstractBasicAuthHandler` of :mod:`urllib.request`
+now parses all WWW-Authenticate HTTP headers and accepts multiple challenges
+per header: use the realm of the first Basic challenge.
+
+..
+
+.. bpo: 40014
+.. date: 2020-03-23-17-52-00
+.. nonce: Ya70VG
+.. section: Library
+
+Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails because the
+group list is too small, retry with a larger group list. On failure, the
+glibc implementation of ``getgrouplist()`` sets ``ngroups`` to the total
+number of groups. For other implementations, double the group list size.
+
+..
+
+.. bpo: 40016
+.. date: 2020-03-19-19-40-27
+.. nonce: JWtxqJ
+.. section: Library
+
+In re docstring, clarify the relationship between inline and argument
+compile flags.
+
+..
+
+.. bpo: 39953
+.. date: 2020-03-19-16-33-03
+.. nonce: yy5lC_
+.. section: Library
+
+Update internal table of OpenSSL error codes in the ``ssl`` module.
+
+..
+
+.. bpo: 39360
+.. date: 2020-03-15-05-41-05
+.. nonce: cmcU5p
+.. section: Library
+
+Ensure all workers exit when finalizing a :class:`multiprocessing.Pool`
+implicitly via the module finalization handlers of multiprocessing. This
+fixes a deadlock situation that can be experienced when the Pool is not
+properly finalized via the context manager or a call to
+``multiprocessing.Pool.terminate``. Patch by Batuhan Taskaya and Pablo
+Galindo.
+
+..
+
+.. bpo: 39652
+.. date: 2020-03-11-23-08-25
+.. nonce: gbasrk
+.. section: Library
+
+The column name found in ``sqlite3.Cursor.description`` is now truncated on
+the first '[' only if the PARSE_COLNAMES option is set.
+
+..
+
+.. bpo: 39915
+.. date: 2020-03-10-19-38-47
+.. nonce: CjPeiY
+.. section: Library
+
+Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has call objects in
+the order of awaited arguments instead of using
+:attr:`unittest.mock.Mock.call_args` which has the last value of the call.
+Patch by Karthikeyan Singaravelan.
+
+..
+
+.. bpo: 38662
+.. date: 2020-03-10-15-32-31
+.. nonce: o1DMXj
+.. section: Library
+
+The ``ensurepip`` module now invokes ``pip`` via the ``runpy`` module. Hence
+it is no longer tightly coupled with the internal API of the bundled ``pip``
+version, allowing easier updates to a newer ``pip`` version both internally
+and for distributors.
+
+..
+
+.. bpo: 39916
+.. date: 2020-03-09-18-56-27
+.. nonce: BHHyp3
+.. section: Library
+
+More reliable use of ``os.scandir()`` in ``Path.glob()``. It no longer emits
+a ResourceWarning when interrupted.
+
+..
+
+.. bpo: 39850
+.. date: 2020-03-09-01-45-06
+.. nonce: eaJNIE
+.. section: Library
+
+:mod:`multiprocessing` now supports abstract socket addresses (if abstract
+sockets are supported in the running platform). Patch by Pablo Galindo.
+
+..
+
+.. bpo: 39828
+.. date: 2020-03-05-00-57-49
+.. nonce: yWq9NJ
+.. section: Library
+
+Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by Dong-hee Na.
+
+..
+
+.. bpo: 13487
+.. date: 2020-03-04-16-10-59
+.. nonce: gqe4Fb
+.. section: Library
+
+Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
+from :func:`inspect.getmodule` when it tried to loop through
+:attr:`sys.modules`.
+
+..
+
+.. bpo: 39794
+.. date: 2020-02-29-19-17-39
+.. nonce: 7VjatS
+.. section: Library
+
+Add --without-decimal-contextvar build option. This enables a thread-local
+rather than a coroutine local context.
+
+..
+
+.. bpo: 39769
+.. date: 2020-02-29-13-20-33
+.. nonce: hJmxu4
+.. section: Library
+
+The :func:`compileall.compile_dir` function's *ddir* parameter and the
+compileall command line flag `-d` no longer write the wrong pathname to the
+generated pyc file for submodules beneath the root of the directory tree
+being compiled. This fixes a regression introduced with Python 3.5.
+
+..
+
+.. bpo: 39517
+.. date: 2020-02-29-11-20-50
+.. nonce: voQZb8
+.. section: Library
+
+Fix runpy.run_path() when using pathlike objects
+
+..
+
+.. bpo: 39764
+.. date: 2020-02-27-18-21-07
+.. nonce: wqPk68
+.. section: Library
+
+Fix AttributeError when calling get_stack on a PyAsyncGenObject Task
+
+..
+
+.. bpo: 30566
+.. date: 2020-02-24-03-45-28
+.. nonce: qROxty
+.. section: Library
+
+Fix :exc:`IndexError` when trying to decode an invalid string with punycode
+codec.
+
+..
+
+.. bpo: 39667
+.. date: 2020-02-17-22-38-15
+.. nonce: QuzEHH
+.. section: Library
+
+Correct performance degradation in ``zipfile.Path`` as found in zipp 3.0.
+While retaining compatibility, this change discourages the use of
+``zipfile.Path.open`` due to the signature change in Python 3.9. For
+compatibility across Python 3.8 and later versions, consider using
+``zipp.Path`` on Python 3.8.x and earlier.
+
+..
+
+.. bpo: 39548
+.. date: 2020-02-06-05-33-52
+.. nonce: DF4FFe
+.. section: Library
+
+Fix handling of header in :class:`urllib.request.AbstractDigestAuthHandler`
+when the optional ``qop`` parameter is not present.
+
+..
+
+.. bpo: 38971
+.. date: 2019-12-20-16-06-28
+.. nonce: fKRYlF
+.. section: Library
+
+Open issue in the BPO indicated a desire to make the implementation of
+codecs.open() at parity with io.open(), which implements a try/except to
+assure file stream gets closed before an exception is raised.
+
+..
+
+.. bpo: 38410
+.. date: 2019-10-09-08-14-25
+.. nonce: _YyoMV
+.. section: Library
+
+Properly handle :func:`sys.audit` failures in
+:func:`sys.set_asyncgen_hooks`. Based on patch by Zackery Spytz.
+
+..
+
+.. bpo: 36541
+.. date: 2019-06-18-19-38-27
+.. nonce: XI8mi1
+.. section: Library
+
+lib2to3 now recognizes named assignment expressions (the walrus operator,
+``:=3D``)
+
+..
+
+.. bpo: 31758
+.. date: 2017-10-14-21-02-40
+.. nonce: 563ZZb
+.. section: Library
+
+Prevent crashes when using an uninitialized ``_elementtree.XMLParser``
+object. Patch by Oren Milman.
+
+..
+
+.. bpo: 27635
+.. date: 2020-04-01-00-27-03
+.. nonce: VwxUty
+.. section: Documentation
+
+The pickle documentation incorrectly claimed that ``__new__`` isn't called
+by default when unpickling.
+
+..
+
+.. bpo: 39879
+.. date: 2020-03-16-18-12-02
+.. nonce: CnQ7Cv
+.. section: Documentation
+
+Updated :ref:`datamodel` docs to include :func:`dict` insertion order
+preservation. Patch by Furkan Onder and Samy Lahfa.
+
+..
+
+.. bpo: 39868
+.. date: 2020-03-05-16-29-03
+.. nonce: JQoHhO
+.. section: Documentation
+
+Updated the Language Reference for :pep:`572`.
+
+..
+
+.. bpo: 13790
+.. date: 2020-02-28-14-39-25
+.. nonce: hvLaRI
+.. section: Documentation
+
+Change 'string' to 'specification' in format doc.
+
+..
+
+.. bpo: 17422
+.. date: 2020-02-27-17-35-27
+.. nonce: eS1hVh
+.. section: Documentation
+
+The language reference no longer restricts default class namespaces to dicts
+only.
+
+..
+
+.. bpo: 39530
+.. date: 2020-02-23-13-26-40
+.. nonce: _bCvzQ
+.. section: Documentation
+
+Fix misleading documentation about mixed-type numeric comparisons.
+
+..
+
+.. bpo: 39718
+.. date: 2020-02-21-22-05-20
+.. nonce: xtBoSi
+.. section: Documentation
+
+Update :mod:`token` documentation to reflect additions in Python 3.8
+
+..
+
+.. bpo: 39677
+.. date: 2020-02-18-14-28-31
+.. nonce: vNHqoX
+.. section: Documentation
+
+Changed operand name of **MAKE_FUNCTION** from *argc* to *flags* for module
+:mod:`dis`
+
+..
+
+.. bpo: 38387
+.. date: 2019-10-06-23-44-15
+.. nonce: fZoq0S
+.. section: Documentation
+
+Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference.
+
+..
+
+.. bpo: 40436
+.. date: 2020-04-29-16-08-24
+.. nonce: gDMnYl
+.. section: Tests
+
+test_gdb and test.pythoninfo now check gdb command exit code.
+
+..
+
+.. bpo: 40162
+.. date: 2020-04-03-02-40-16
+.. nonce: v3pQW_
+.. section: Tests
+
+Update Travis CI configuration to OpenSSL 1.1.1f.
+
+..
+
+.. bpo: 40146
+.. date: 2020-04-02-02-14-37
+.. nonce: J-Yo9G
+.. section: Tests
+
+Update OpenSSL to 1.1.1f in Azure Pipelines.
+
+..
+
+.. bpo: 40019
+.. date: 2020-03-20-00-30-36
+.. nonce: zOqHpQ
+.. section: Tests
+
+test_gdb now skips tests if it detects that gdb failed to read debug
+information because the Python binary is optimized.
+
+..
+
+.. bpo: 27807
+.. date: 2020-03-18-16-04-33
+.. nonce: 9gKjET
+.. section: Tests
+
+``test_site.test_startup_imports()`` is now skipped if a path of
+:data:`sys.path` contains a ``.pth`` file.
+
+..
+
+.. bpo: 39793
+.. date: 2020-02-29-12-58-17
+.. nonce: Og2SUN
+.. section: Tests
+
+Use the same domain when testing ``make_msgid``. Patch by Batuhan Taskaya.
+
+..
+
+.. bpo: 1812
+.. date: 2019-11-25-21-46-47
+.. nonce: sAbTbY
+.. section: Tests
+
+Fix newline handling in doctest.testfile when loading from a package whose
+loader has a get_data method. Patch by Peter Donis.
+
+..
+
+.. bpo: 37957
+.. date: 2019-10-30-00-01-43
+.. nonce: X1r78F
+.. section: Tests
+
+test.regrtest now can receive a list of test patterns to ignore (using the
+-i/--ignore argument) or a file with a list of patterns to ignore (using the
+--ignore-file argument). Patch by Pablo Galindo.
+
+..
+
+.. bpo: 38502
+.. date: 2019-10-17-00-49-38
+.. nonce: vUEic7
+.. section: Tests
+
+test.regrtest now uses process groups in the multiprocessing mode (-jN
+command line option) if process groups are available: if :func:`os.setsid`
+and :func:`os.killpg` functions are available.
+
+..
+
+.. bpo: 38360
+.. date: 2020-04-22-02-33-54
+.. nonce: 74C68u
+.. section: Build
+
+Support single-argument form of macOS -isysroot flag.
+
+..
+
+.. bpo: 40204
+.. date: 2020-04-09-00-19-10
+.. nonce: K-S6RZ
+.. section: Build
+
+Pin Sphinx version to 1.8.2 in ``Doc/Makefile``.
+
+..
+
+.. bpo: 40158
+.. date: 2020-04-03-17-54-33
+.. nonce: MWUTs4
+.. section: Build
+
+Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)
+
+..
+
+.. bpo: 38527
+.. date: 2020-03-28-10-43-09
+.. nonce: fqCRgD
+.. section: Build
+
+Fix configure check on Solaris for "float word ordering": sometimes, the
+correct "grep" command was not being used. Patch by Arnon Yaari.
+
+..
+
+.. bpo: 40164
+.. date: 2020-04-04-13-13-44
+.. nonce: SPrSn5
+.. section: Windows
+
+Updates Windows to OpenSSL 1.1.1f
+
+..
+
+.. bpo: 39930
+.. date: 2020-03-11-10-15-56
+.. nonce: LGHw1j
+.. section: Windows
+
+Ensures the required :file:`vcruntime140.dll` is included in install
+packages.
+
+..
+
+.. bpo: 39847
+.. date: 2020-03-04-17-05-11
+.. nonce: C3N2m3
+.. section: Windows
+
+Avoid hang when computer is hibernated whilst waiting for a mutex (for
+lock-related objects from :mod:`threading`) around 49-day uptime.
+
+..
+
+.. bpo: 38597
+.. date: 2020-03-01-15-04-54
+.. nonce: MnHdYl
+.. section: Windows
+
+:mod:`distutils` will no longer statically link :file:`vcruntime140.dll`
+when a redistributable version is unavailable. All future releases of
+CPython will include a copy of this DLL to ensure distributed extensions can
+continue to load.
+
+..
+
+.. bpo: 38380
+.. date: 2020-02-28-23-51-27
+.. nonce: TpOBCj
+.. section: Windows
+
+Update Windows builds to use SQLite 3.31.1
+
+..
+
+.. bpo: 39789
+.. date: 2020-02-28-22-46-09
+.. nonce: 67XRoP
+.. section: Windows
+
+Update Windows release build machines to Visual Studio 2019 (MSVC 14.2).
+
+..
+
+.. bpo: 34803
+.. date: 2020-02-25-18-43-34
+.. nonce: S3VcS0
+.. section: Windows
+
+Package for nuget.org now includes repository reference and bundled icon
+image.
+
+..
+
+.. bpo: 40164
+.. date: 2020-04-21-19-46-35
+.. nonce: 6HA6IC
+.. section: macOS
+
+Update macOS installer builds to use OpenSSL 1.1.1g.
+
+..
+
+.. bpo: 38380
+.. date: 2020-02-28-23-51-47
+.. nonce: u-ySyA
+.. section: macOS
+
+Update macOS builds to use SQLite 3.31.1
+
+..
+
+.. bpo: 27115
+.. date: 2020-03-09-02-45-12
+.. nonce: 8hSHMo
+.. section: IDLE
+
+For 'Go to Line', use a Query box subclass with IDLE standard behavior and
+improved error checking.
+
+..
+
+.. bpo: 39885
+.. date: 2020-03-08-14-27-36
+.. nonce: 29ERiR
+.. section: IDLE
+
+Since clicking to get an IDLE context menu moves the cursor, any text
+selection should be and now is cleared.
+
+..
+
+.. bpo: 39852
+.. date: 2020-03-06-01-55-14
+.. nonce: QjA1qF
+.. section: IDLE
+
+Edit "Go to line" now clears any selection, preventing accidental deletion.
+It also updates Ln and Col on the status bar.
+
+..
+
+.. bpo: 39781
+.. date: 2020-02-27-22-17-09
+.. nonce: bbYBeL
+.. section: IDLE
+
+Selecting code context lines no longer causes a jump.
+
+..
+
+.. bpo: 38439
+.. date: 2019-12-05-14-20-53
+.. nonce: j_L2PI
+.. section: IDLE
+
+Add a 256=C3=97256 pixel IDLE icon to support more modern environments. Crea=
ted
+by Andrew Clover. Delete the unused macOS idle.icns icon file.
+
+..
+
+.. bpo: 38689
+.. date: 2019-11-14-12-59-19
+.. nonce: Lgfxva
+.. section: IDLE
+
+IDLE will no longer freeze when inspect.signature fails when fetching a
+calltip.
+
+..
+
+.. bpo: 40179
+.. date: 2020-04-04-19-35-22
+.. nonce: u9FH10
+.. section: Tools/Demos
+
+Fixed translation of ``#elif`` in Argument Clinic.
+
+..
+
+.. bpo: 36184
+.. date: 2020-03-09-13-28-13
+.. nonce: BMPJ0D
+.. section: Tools/Demos
+
+Port python-gdb.py to FreeBSD. python-gdb.py now checks for "take_gil"
+function name to check if a frame tries to acquire the GIL, instead of
+checking for "pthread_cond_timedwait" which is specific to Linux and can be
+a different condition than the GIL.
+
+..
+
+.. bpo: 39889
+.. date: 2020-03-07-18-01-30
+.. nonce: l1czT6
+.. section: Tools/Demos
+
+Fixed ``unparse.py`` for extended slices containing a single element (e.g.
+``a[i:j,]``). Remove redundant tuples when index with a tuple (e.g. ``a[i,
+j]``).
+
+..
+
+.. bpo: 35370
+.. date: 2020-03-13-16-44-23
+.. nonce: sXRA-r
+.. section: C API
+
+If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` or
+:c:func:`PyEval_SetTrace`, log the error as an unraisable exception.
+
+..
+
+.. bpo: 39884
+.. date: 2020-03-12-00-27-26
+.. nonce: CGOJBO
+.. section: C API
+
+:c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now include the
+method name in the SystemError "bad call flags" error message to ease debug.
+
+..
+
+.. bpo: 38643
+.. date: 2020-03-08-22-56-22
+.. nonce: k2ixx6
+.. section: C API
+
+:c:func:`PyNumber_ToBase` now raises a :exc:`SystemError` instead of
+crashing when called with invalid base.
+
+..
+
+.. bpo: 38913
+.. date: 2020-02-25-20-10-34
+.. nonce: siF1lS
+.. section: C API
+
+Fixed segfault in ``Py_BuildValue()`` called with a format containing "#"
+and undefined PY_SSIZE_T_CLEAN whwn an exception is set.
diff --git a/Misc/NEWS.d/next/Build/2020-03-28-10-43-09.bpo-38527.fqCRgD.rst =
b/Misc/NEWS.d/next/Build/2020-03-28-10-43-09.bpo-38527.fqCRgD.rst
deleted file mode 100644
index 869693095e49a..0000000000000
--- a/Misc/NEWS.d/next/Build/2020-03-28-10-43-09.bpo-38527.fqCRgD.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix configure check on Solaris for "float word ordering": sometimes, the cor=
rect "grep" command was not being used.
-Patch by Arnon Yaari.
diff --git a/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst =
b/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
deleted file mode 100644
index a81548c3f9cdf..0000000000000
--- a/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Build/2020-04-09-00-19-10.bpo-40204.K-S6RZ.rst =
b/Misc/NEWS.d/next/Build/2020-04-09-00-19-10.bpo-40204.K-S6RZ.rst
deleted file mode 100644
index e08f36f03cb5a..0000000000000
--- a/Misc/NEWS.d/next/Build/2020-04-09-00-19-10.bpo-40204.K-S6RZ.rst
+++ /dev/null
@@ -1 +0,0 @@
-Pin Sphinx version to 1.8.2 in ``Doc/Makefile``.
diff --git a/Misc/NEWS.d/next/Build/2020-04-22-02-33-54.bpo-38360.74C68u.rst =
b/Misc/NEWS.d/next/Build/2020-04-22-02-33-54.bpo-38360.74C68u.rst
deleted file mode 100644
index e96ca14919919..0000000000000
--- a/Misc/NEWS.d/next/Build/2020-04-22-02-33-54.bpo-38360.74C68u.rst
+++ /dev/null
@@ -1 +0,0 @@
-Support single-argument form of macOS -isysroot flag.
diff --git a/Misc/NEWS.d/next/C API/2020-02-25-20-10-34.bpo-38913.siF1lS.rst =
b/Misc/NEWS.d/next/C API/2020-02-25-20-10-34.bpo-38913.siF1lS.rst
deleted file mode 100644
index 0e4d1210315d8..0000000000000
--- a/Misc/NEWS.d/next/C API/2020-02-25-20-10-34.bpo-38913.siF1lS.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed segfault in ``Py_BuildValue()`` called with a format containing "#"
-and undefined PY_SSIZE_T_CLEAN whwn an exception is set.
diff --git a/Misc/NEWS.d/next/C API/2020-03-08-22-56-22.bpo-38643.k2ixx6.rst =
b/Misc/NEWS.d/next/C API/2020-03-08-22-56-22.bpo-38643.k2ixx6.rst
deleted file mode 100644
index 1e6472fd5578f..0000000000000
--- a/Misc/NEWS.d/next/C API/2020-03-08-22-56-22.bpo-38643.k2ixx6.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-:c:func:`PyNumber_ToBase` now raises a :exc:`SystemError` instead of
-crashing when called with invalid base.
diff --git a/Misc/NEWS.d/next/C API/2020-03-12-00-27-26.bpo-39884.CGOJBO.rst =
b/Misc/NEWS.d/next/C API/2020-03-12-00-27-26.bpo-39884.CGOJBO.rst
deleted file mode 100644
index c65dfdc21244a..0000000000000
--- a/Misc/NEWS.d/next/C API/2020-03-12-00-27-26.bpo-39884.CGOJBO.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-:c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now include the
-method name in the SystemError "bad call flags" error message to ease debug.
diff --git a/Misc/NEWS.d/next/C API/2020-03-13-16-44-23.bpo-35370.sXRA-r.rst =
b/Misc/NEWS.d/next/C API/2020-03-13-16-44-23.bpo-35370.sXRA-r.rst
deleted file mode 100644
index d3f1d293b6938..0000000000000
--- a/Misc/NEWS.d/next/C API/2020-03-13-16-44-23.bpo-35370.sXRA-r.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` or
-:c:func:`PyEval_SetTrace`, log the error as an unraisable exception.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-09-23-16-32-58.bpo-22490=
.8e0YDf.rst b/Misc/NEWS.d/next/Core and Builtins/2018-09-23-16-32-58.bpo-2249=
0.8e0YDf.rst
deleted file mode 100644
index a281f024249f5..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2018-09-23-16-32-58.bpo-22490.8e0YDf=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Don't leak environment variable ``__PYVENV_LAUNCHER__`` into the interpreter
-session on macOS.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-02-00-12-07.bpo-39520=
.uicBq6.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-02-00-12-07.bpo-3952=
0.uicBq6.rst
deleted file mode 100644
index dec67656fa849..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-02-02-00-12-07.bpo-39520.uicBq6=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix unparsing of ext slices with no items (``foo[:,]``). Patch by Batuhan
-Taskaya.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-02-19-21-21.bpo-39778=
._YGLEc.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-02-19-21-21.bpo-3977=
8._YGLEc.rst
deleted file mode 100644
index dc49512167365..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-02-19-21-21.bpo-39778._YGLEc=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed a crash due to incorrect handling of weak references in
-``collections.OrderedDict`` classes. Patch by Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776=
.fNaxi_.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-3977=
6.fNaxi_.rst
deleted file mode 100644
index e5a00bd96ae47..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-02-20-12-33.bpo-39776.fNaxi_=
.rst=09
+++ /dev/null
@@ -1,6 +0,0 @@
-Fix race condition where threads created by PyGILState_Ensure() could get a
-duplicate id.
-
-This affects consumers of tstate->id like the contextvar caching machinery,
-which could return invalid cached objects under heavy thread load (observed
-in embedded scenarios).
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-06-06-12-37.bpo-39871=
.dCAj_2.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-06-06-12-37.bpo-3987=
1.dCAj_2.rst
deleted file mode 100644
index 0b4c2e5f4cc92..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-06-06-12-37.bpo-39871.dCAj_2=
.rst=09
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix a possible :exc:`SystemError` in ``math.{atan2,copysign,remainder}()``
-when the first argument cannot be converted to a :class:`float`. Patch by
-Zachary Spytz.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-06-21-04-39.bpo-38894=
.nfcGKv.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-06-21-04-39.bpo-3889=
4.nfcGKv.rst
deleted file mode 100644
index a937b8ecc626f..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-06-21-04-39.bpo-38894.nfcGKv=
.rst=09
+++ /dev/null
@@ -1,4 +0,0 @@
-Fix a bug that was causing incomplete results when calling
-``pathlib.Path.glob`` in the presence of symlinks that point
-to files where the user does not have read access. Patch by Pablo
-Galindo and Matt Wozniski.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-12-22-13-50.bpo-39562=
.E2u273.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-12-22-13-50.bpo-3956=
2.E2u273.rst
deleted file mode 100644
index dbe83c6aa19f9..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-12-22-13-50.bpo-39562.E2u273=
.rst=09
+++ /dev/null
@@ -1,2 +0,0 @@
-Allow executing asynchronous comprehensions on the top level when the
-``PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag is given. Patch by Batuhan Taskaya.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-15-03-52-01.bpo-39965=
.Od3ZdP.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-15-03-52-01.bpo-3996=
5.Od3ZdP.rst
deleted file mode 100644
index 4e3ac7ce7d681..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-15-03-52-01.bpo-39965.Od3ZdP=
.rst=09
+++ /dev/null
@@ -1,3 +0,0 @@
-Correctly raise ``SyntaxError`` if *await* is used inside non-async
-functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the asyncio
-REPL). Patch by Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-20526=
.NHNZIv.rst b/Misc/NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-2052=
6.NHNZIv.rst
deleted file mode 100644
index c808b7608c61e..0000000000000
--- a/Misc/NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-20526.NHNZIv=
.rst=09
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is a borrowed
-reference, not a strong reference: ``PyThreadState_Clear()`` must not call
-``Py_CLEAR(tstate->frame)``.
diff --git a/Misc/NEWS.d/next/Documentation/2019-10-06-23-44-15.bpo-38387.fZo=
q0S.rst b/Misc/NEWS.d/next/Documentation/2019-10-06-23-44-15.bpo-38387.fZoq0S=
.rst
deleted file mode 100644
index a678fe5052673..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2019-10-06-23-44-15.bpo-38387.fZoq0S.rst
+++ /dev/null
@@ -1 +0,0 @@
-Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference.
diff --git a/Misc/NEWS.d/next/Documentation/2020-02-18-14-28-31.bpo-39677.vNH=
qoX.rst b/Misc/NEWS.d/next/Documentation/2020-02-18-14-28-31.bpo-39677.vNHqoX=
.rst
deleted file mode 100644
index 3678a721fc6d7..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-02-18-14-28-31.bpo-39677.vNHqoX.rst
+++ /dev/null
@@ -1 +0,0 @@
-Changed operand name of **MAKE_FUNCTION** from *argc* to *flags* for module =
:mod:`dis`
diff --git a/Misc/NEWS.d/next/Documentation/2020-02-21-22-05-20.bpo-39718.xtB=
oSi.rst b/Misc/NEWS.d/next/Documentation/2020-02-21-22-05-20.bpo-39718.xtBoSi=
.rst
deleted file mode 100644
index 8072f617192b4..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-02-21-22-05-20.bpo-39718.xtBoSi.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update :mod:`token` documentation to reflect additions in Python 3.8
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Documentation/2020-02-23-13-26-40.bpo-39530._bC=
vzQ.rst b/Misc/NEWS.d/next/Documentation/2020-02-23-13-26-40.bpo-39530._bCvzQ=
.rst
deleted file mode 100644
index b7a02522bbb1c..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-02-23-13-26-40.bpo-39530._bCvzQ.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix misleading documentation about mixed-type numeric comparisons.
diff --git a/Misc/NEWS.d/next/Documentation/2020-02-27-17-35-27.bpo-17422.eS1=
hVh.rst b/Misc/NEWS.d/next/Documentation/2020-02-27-17-35-27.bpo-17422.eS1hVh=
.rst
deleted file mode 100644
index bbec5ec0eee65..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-02-27-17-35-27.bpo-17422.eS1hVh.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-The language reference no longer restricts default class namespaces to dicts
-only.
diff --git a/Misc/NEWS.d/next/Documentation/2020-02-28-14-39-25.bpo-13790.hvL=
aRI.rst b/Misc/NEWS.d/next/Documentation/2020-02-28-14-39-25.bpo-13790.hvLaRI=
.rst
deleted file mode 100644
index 77db173168fc5..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-02-28-14-39-25.bpo-13790.hvLaRI.rst
+++ /dev/null
@@ -1 +0,0 @@
-Change 'string' to 'specification' in format doc.
diff --git a/Misc/NEWS.d/next/Documentation/2020-03-05-16-29-03.bpo-39868.JQo=
HhO.rst b/Misc/NEWS.d/next/Documentation/2020-03-05-16-29-03.bpo-39868.JQoHhO=
.rst
deleted file mode 100644
index 9fa8bfd04f7db..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-03-05-16-29-03.bpo-39868.JQoHhO.rst
+++ /dev/null
@@ -1 +0,0 @@
-Updated the Language Reference for :pep:`572`.
diff --git a/Misc/NEWS.d/next/Documentation/2020-03-16-18-12-02.bpo-39879.CnQ=
7Cv.rst b/Misc/NEWS.d/next/Documentation/2020-03-16-18-12-02.bpo-39879.CnQ7Cv=
.rst
deleted file mode 100644
index 6698ed607ca0e..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-03-16-18-12-02.bpo-39879.CnQ7Cv.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Updated :ref:`datamodel` docs to include :func:`dict` insertion order preser=
vation.
-Patch by Furkan Onder and Samy Lahfa.
diff --git a/Misc/NEWS.d/next/Documentation/2020-04-01-00-27-03.bpo-27635.Vwx=
Uty.rst b/Misc/NEWS.d/next/Documentation/2020-04-01-00-27-03.bpo-27635.VwxUty=
.rst
deleted file mode 100644
index 24f640bd4ef5f..0000000000000
--- a/Misc/NEWS.d/next/Documentation/2020-04-01-00-27-03.bpo-27635.VwxUty.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-The pickle documentation incorrectly claimed that ``__new__`` isn't called by
-default when unpickling.
diff --git a/Misc/NEWS.d/next/IDLE/2019-11-14-12-59-19.bpo-38689.Lgfxva.rst b=
/Misc/NEWS.d/next/IDLE/2019-11-14-12-59-19.bpo-38689.Lgfxva.rst
deleted file mode 100644
index f4f4a2e9afd85..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2019-11-14-12-59-19.bpo-38689.Lgfxva.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-IDLE will no longer freeze when inspect.signature fails when fetching
-a calltip.
diff --git a/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst b=
/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
deleted file mode 100644
index de048d005cee7..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2019-12-05-14-20-53.bpo-38439.j_L2PI.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Add a 256=C3=97256 pixel IDLE icon to support more modern environments. Crea=
ted by Andrew Clover.
-Delete the unused macOS idle.icns icon file.
diff --git a/Misc/NEWS.d/next/IDLE/2020-02-27-22-17-09.bpo-39781.bbYBeL.rst b=
/Misc/NEWS.d/next/IDLE/2020-02-27-22-17-09.bpo-39781.bbYBeL.rst
deleted file mode 100644
index 4ae0defc2e217..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-02-27-22-17-09.bpo-39781.bbYBeL.rst
+++ /dev/null
@@ -1 +0,0 @@
-Selecting code context lines no longer causes a jump.
diff --git a/Misc/NEWS.d/next/IDLE/2020-03-06-01-55-14.bpo-39852.QjA1qF.rst b=
/Misc/NEWS.d/next/IDLE/2020-03-06-01-55-14.bpo-39852.QjA1qF.rst
deleted file mode 100644
index 7d7d941418074..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-03-06-01-55-14.bpo-39852.QjA1qF.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Edit "Go to line" now clears any selection, preventing accidental deletion.
-It also updates Ln and Col on the status bar.
diff --git a/Misc/NEWS.d/next/IDLE/2020-03-08-14-27-36.bpo-39885.29ERiR.rst b=
/Misc/NEWS.d/next/IDLE/2020-03-08-14-27-36.bpo-39885.29ERiR.rst
deleted file mode 100644
index f0f434ad3c1f4..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-03-08-14-27-36.bpo-39885.29ERiR.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Since clicking to get an IDLE context menu moves the cursor,
-any text selection should be and now is cleared.
diff --git a/Misc/NEWS.d/next/IDLE/2020-03-09-02-45-12.bpo-27115.8hSHMo.rst b=
/Misc/NEWS.d/next/IDLE/2020-03-09-02-45-12.bpo-27115.8hSHMo.rst
deleted file mode 100644
index 76af19e6014b4..0000000000000
--- a/Misc/NEWS.d/next/IDLE/2020-03-09-02-45-12.bpo-27115.8hSHMo.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-For 'Go to Line', use a Query box subclass with IDLE standard behavior
-and improved error checking.
diff --git a/Misc/NEWS.d/next/Library/2017-10-14-21-02-40.bpo-31758.563ZZb.rs=
t b/Misc/NEWS.d/next/Library/2017-10-14-21-02-40.bpo-31758.563ZZb.rst
deleted file mode 100644
index 92e55db2b0986..0000000000000
--- a/Misc/NEWS.d/next/Library/2017-10-14-21-02-40.bpo-31758.563ZZb.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Prevent crashes when using an uninitialized ``_elementtree.XMLParser``
-object. Patch by Oren Milman.
diff --git a/Misc/NEWS.d/next/Library/2019-06-18-19-38-27.bpo-36541.XI8mi1.rs=
t b/Misc/NEWS.d/next/Library/2019-06-18-19-38-27.bpo-36541.XI8mi1.rst
deleted file mode 100644
index e7b9dd648b407..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-06-18-19-38-27.bpo-36541.XI8mi1.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-lib2to3 now recognizes named assignment expressions (the walrus operator,
-``:=3D``)
diff --git a/Misc/NEWS.d/next/Library/2019-10-09-08-14-25.bpo-38410._YyoMV.rs=
t b/Misc/NEWS.d/next/Library/2019-10-09-08-14-25.bpo-38410._YyoMV.rst
deleted file mode 100644
index fcfd7936e63ac..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-10-09-08-14-25.bpo-38410._YyoMV.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Properly handle :func:`sys.audit` failures in
-:func:`sys.set_asyncgen_hooks`. Based on patch by Zackery Spytz.
diff --git a/Misc/NEWS.d/next/Library/2019-12-20-16-06-28.bpo-38971.fKRYlF.rs=
t b/Misc/NEWS.d/next/Library/2019-12-20-16-06-28.bpo-38971.fKRYlF.rst
deleted file mode 100644
index 9676d72b44abc..0000000000000
--- a/Misc/NEWS.d/next/Library/2019-12-20-16-06-28.bpo-38971.fKRYlF.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Open issue in the BPO indicated a desire to make the implementation of
-codecs.open() at parity with io.open(), which implements a try/except to
-assure file stream gets closed before an exception is raised.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rs=
t b/Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rst
deleted file mode 100644
index 4cf32487b1f7a..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-06-05-33-52.bpo-39548.DF4FFe.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix handling of header in :class:`urllib.request.AbstractDigestAuthHandler` =
when the optional ``qop`` parameter
-is not present.
diff --git a/Misc/NEWS.d/next/Library/2020-02-17-22-38-15.bpo-39667.QuzEHH.rs=
t b/Misc/NEWS.d/next/Library/2020-02-17-22-38-15.bpo-39667.QuzEHH.rst
deleted file mode 100644
index ccc33e289846a..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-17-22-38-15.bpo-39667.QuzEHH.rst
+++ /dev/null
@@ -1 +0,0 @@
-Correct performance degradation in ``zipfile.Path`` as found in zipp 3.0. Wh=
ile retaining compatibility, this change discourages the use of ``zipfile.Pat=
h.open`` due to the signature change in Python 3.9. For compatibility across =
Python 3.8 and later versions, consider using ``zipp.Path`` on Python 3.8.x a=
nd earlier.
diff --git a/Misc/NEWS.d/next/Library/2020-02-24-03-45-28.bpo-30566.qROxty.rs=
t b/Misc/NEWS.d/next/Library/2020-02-24-03-45-28.bpo-30566.qROxty.rst
deleted file mode 100644
index c780633030090..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-24-03-45-28.bpo-30566.qROxty.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix :exc:`IndexError` when trying to decode an invalid string with punycode
-codec.
diff --git a/Misc/NEWS.d/next/Library/2020-02-27-18-21-07.bpo-39764.wqPk68.rs=
t b/Misc/NEWS.d/next/Library/2020-02-27-18-21-07.bpo-39764.wqPk68.rst
deleted file mode 100644
index d61db2ea221f2..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-27-18-21-07.bpo-39764.wqPk68.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix AttributeError when calling get_stack on a PyAsyncGenObject Task
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-02-29-11-20-50.bpo-39517.voQZb8.rs=
t b/Misc/NEWS.d/next/Library/2020-02-29-11-20-50.bpo-39517.voQZb8.rst
deleted file mode 100644
index 0cd628f43a8e4..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-29-11-20-50.bpo-39517.voQZb8.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix runpy.run_path() when using pathlike objects
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rs=
t b/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst
deleted file mode 100644
index 9b564bd10d3b3..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-29-13-20-33.bpo-39769.hJmxu4.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-The :func:`compileall.compile_dir` function's *ddir* parameter and the
-compileall command line flag `-d` no longer write the wrong pathname to the
-generated pyc file for submodules beneath the root of the directory tree
-being compiled. This fixes a regression introduced with Python 3.5.
diff --git a/Misc/NEWS.d/next/Library/2020-02-29-19-17-39.bpo-39794.7VjatS.rs=
t b/Misc/NEWS.d/next/Library/2020-02-29-19-17-39.bpo-39794.7VjatS.rst
deleted file mode 100644
index b2a4726068af9..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-02-29-19-17-39.bpo-39794.7VjatS.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Add --without-decimal-contextvar build option. This enables a thread-local
-rather than a coroutine local context.
diff --git a/Misc/NEWS.d/next/Library/2020-03-04-16-10-59.bpo-13487.gqe4Fb.rs=
t b/Misc/NEWS.d/next/Library/2020-03-04-16-10-59.bpo-13487.gqe4Fb.rst
deleted file mode 100644
index 5a1f02a7bdf37..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-04-16-10-59.bpo-13487.gqe4Fb.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Avoid a possible *"RuntimeError: dictionary changed size during iteration"*
-from :func:`inspect.getmodule` when it tried to loop through
-:attr:`sys.modules`.
diff --git a/Misc/NEWS.d/next/Library/2020-03-05-00-57-49.bpo-39828.yWq9NJ.rs=
t b/Misc/NEWS.d/next/Library/2020-03-05-00-57-49.bpo-39828.yWq9NJ.rst
deleted file mode 100644
index 04c61b94c45d6..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-05-00-57-49.bpo-39828.yWq9NJ.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by Dong-hee Na.
diff --git a/Misc/NEWS.d/next/Library/2020-03-09-01-45-06.bpo-39850.eaJNIE.rs=
t b/Misc/NEWS.d/next/Library/2020-03-09-01-45-06.bpo-39850.eaJNIE.rst
deleted file mode 100644
index 57f98f5f0d6fb..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-09-01-45-06.bpo-39850.eaJNIE.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-:mod:`multiprocessing` now supports abstract socket addresses (if abstract s=
ockets
-are supported in the running platform). Patch by Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Library/2020-03-09-18-56-27.bpo-39916.BHHyp3.rs=
t b/Misc/NEWS.d/next/Library/2020-03-09-18-56-27.bpo-39916.BHHyp3.rst
deleted file mode 100644
index 5f490627b21e3..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-09-18-56-27.bpo-39916.BHHyp3.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-More reliable use of ``os.scandir()`` in ``Path.glob()``. It no longer emits
-a ResourceWarning when interrupted.
diff --git a/Misc/NEWS.d/next/Library/2020-03-10-15-32-31.bpo-38662.o1DMXj.rs=
t b/Misc/NEWS.d/next/Library/2020-03-10-15-32-31.bpo-38662.o1DMXj.rst
deleted file mode 100644
index 241b2a6272ad6..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-10-15-32-31.bpo-38662.o1DMXj.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-The ``ensurepip`` module now invokes ``pip`` via the ``runpy`` module.
-Hence it is no longer tightly coupled with the internal API of the bundled
-``pip`` version, allowing easier updates to a newer ``pip`` version both
-internally and for distributors.
diff --git a/Misc/NEWS.d/next/Library/2020-03-10-19-38-47.bpo-39915.CjPeiY.rs=
t b/Misc/NEWS.d/next/Library/2020-03-10-19-38-47.bpo-39915.CjPeiY.rst
deleted file mode 100644
index 2c369474c2df8..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-10-19-38-47.bpo-39915.CjPeiY.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has call objects in
-the order of awaited arguments instead of using
-:attr:`unittest.mock.Mock.call_args` which has the last value of the call.
-Patch by Karthikeyan Singaravelan.
diff --git a/Misc/NEWS.d/next/Library/2020-03-11-23-08-25.bpo-39652.gbasrk.rs=
t b/Misc/NEWS.d/next/Library/2020-03-11-23-08-25.bpo-39652.gbasrk.rst
deleted file mode 100644
index 9b75ae9df6cec..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-11-23-08-25.bpo-39652.gbasrk.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-The column name found in ``sqlite3.Cursor.description`` is now truncated on
-the first '[' only if the PARSE_COLNAMES option is set.
diff --git a/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rs=
t b/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst
deleted file mode 100644
index 148878886e6ee..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Ensure all workers exit when finalizing a :class:`multiprocessing.Pool` impl=
icitly via the module finalization
-handlers of multiprocessing. This fixes a deadlock situation that can be exp=
erienced when the Pool is not
-properly finalized via the context manager or a call to ``multiprocessing.Po=
ol.terminate``. Patch by Batuhan Taskaya
-and Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Library/2020-03-19-16-33-03.bpo-39953.yy5lC_.rs=
t b/Misc/NEWS.d/next/Library/2020-03-19-16-33-03.bpo-39953.yy5lC_.rst
deleted file mode 100644
index 3fea7c87ea885..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-19-16-33-03.bpo-39953.yy5lC_.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update internal table of OpenSSL error codes in the ``ssl`` module.
diff --git a/Misc/NEWS.d/next/Library/2020-03-19-19-40-27.bpo-40016.JWtxqJ.rs=
t b/Misc/NEWS.d/next/Library/2020-03-19-19-40-27.bpo-40016.JWtxqJ.rst
deleted file mode 100644
index 0c6449de52799..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-19-19-40-27.bpo-40016.JWtxqJ.rst
+++ /dev/null
@@ -1 +0,0 @@
-In re docstring, clarify the relationship between inline and argument compil=
e flags.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rs=
t b/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
deleted file mode 100644
index e9b36c211324b..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails because the
-group list is too small, retry with a larger group list. On failure, the gli=
bc
-implementation of ``getgrouplist()`` sets ``ngroups`` to the total number of
-groups. For other implementations, double the group list size.
diff --git a/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rs=
t b/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst
deleted file mode 100644
index be80ce79d91ed..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-:class:`~urllib.request.AbstractBasicAuthHandler` of :mod:`urllib.request`
-now parses all WWW-Authenticate HTTP headers and accepts multiple challenges
-per header: use the realm of the first Basic challenge.
diff --git a/Misc/NEWS.d/next/Library/2020-03-27-17-22-34.bpo-40089.-lFsD0.rs=
t b/Misc/NEWS.d/next/Library/2020-03-27-17-22-34.bpo-40089.-lFsD0.rst
deleted file mode 100644
index f5335a33c066c..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-03-27-17-22-34.bpo-40089.-lFsD0.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fix threading._after_fork(): if fork was not called by a thread spawned by
-threading.Thread, threading._after_fork() now creates a _MainThread instance
-for _main_thread, instead of a _DummyThread instance.
diff --git a/Misc/NEWS.d/next/Library/2020-04-04-00-47-40.bpo-40126.Y-bTNP.rs=
t b/Misc/NEWS.d/next/Library/2020-04-04-00-47-40.bpo-40126.Y-bTNP.rst
deleted file mode 100644
index 8f725cfba86e2..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-04-00-47-40.bpo-40126.Y-bTNP.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fixed reverting multiple patches in unittest.mock. Patcher's ``__exit__()``
-is now never called if its ``__enter__()`` is failed. Returning true from
-``__exit__()`` silences now the exception.
diff --git a/Misc/NEWS.d/next/Library/2020-04-06-11-05-13.bpo-40196.Jqowse.rs=
t b/Misc/NEWS.d/next/Library/2020-04-06-11-05-13.bpo-40196.Jqowse.rst
deleted file mode 100644
index c5fbd6e5ff3fb..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-06-11-05-13.bpo-40196.Jqowse.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix a bug in the :mod:`symtable` module that was causing incorrectly report
-global variables as local. Patch by Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Library/2020-04-12-21-18-56.bpo-40260.F6VWaE.rs=
t b/Misc/NEWS.d/next/Library/2020-04-12-21-18-56.bpo-40260.F6VWaE.rst
deleted file mode 100644
index decc073bf4d61..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-12-21-18-56.bpo-40260.F6VWaE.rst
+++ /dev/null
@@ -1 +0,0 @@
-Ensure :mod:`modulefinder` uses :func:`io.open_code` and respects coding com=
ments.
diff --git a/Misc/NEWS.d/next/Library/2020-04-15-17-21-48.bpo-40287.-mkEJH.rs=
t b/Misc/NEWS.d/next/Library/2020-04-15-17-21-48.bpo-40287.-mkEJH.rst
deleted file mode 100644
index d4db192b71076..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-15-17-21-48.bpo-40287.-mkEJH.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fixed ``SpooledTemporaryFile.seek()`` to return the position.
diff --git a/Misc/NEWS.d/next/Library/2020-04-19-17-31-29.bpo-40330.DGjoIS.rs=
t b/Misc/NEWS.d/next/Library/2020-04-19-17-31-29.bpo-40330.DGjoIS.rst
deleted file mode 100644
index 98cb62f1b115e..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-19-17-31-29.bpo-40330.DGjoIS.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-In :meth:`ShareableList.__setitem__`, check the size of a new string item
-after encoding it to utf-8, not before.
diff --git a/Misc/NEWS.d/next/Library/2020-04-20-20-16-02.bpo-39942.NvGnTc.rs=
t b/Misc/NEWS.d/next/Library/2020-04-20-20-16-02.bpo-39942.NvGnTc.rst
deleted file mode 100644
index 3b83037d170f6..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-20-20-16-02.bpo-39942.NvGnTc.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Set "__main__" as the default module name when "__name__" is missing in
-:class:`typing.TypeVar`. Patch by Weipeng Hong.
diff --git a/Misc/NEWS.d/next/Library/2020-04-22-00-05-10.bpo-40138.i_oGqa.rs=
t b/Misc/NEWS.d/next/Library/2020-04-22-00-05-10.bpo-40138.i_oGqa.rst
deleted file mode 100644
index ad5faf3865751..0000000000000
--- a/Misc/NEWS.d/next/Library/2020-04-22-00-05-10.bpo-40138.i_oGqa.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix the Windows implementation of :func:`os.waitpid` for exit code larger th=
an
-``INT_MAX >> 8``. The exit status is now interpreted as an unsigned number.
diff --git a/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.r=
st b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst
deleted file mode 100644
index 9f2800581ca5e..0000000000000
--- a/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-CVE-2020-8492: The :class:`~urllib.request.AbstractBasicAuthHandler` class o=
f the
-:mod:`urllib.request` module uses an inefficient regular expression which can
-be exploited by an attacker to cause a denial of service. Fix the regex to
-prevent the catastrophic backtracking. Vulnerability reported by Ben Caller
-and Matt Schwager.
diff --git a/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.r=
st b/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
deleted file mode 100644
index 34b8af28988fa..0000000000000
--- a/Misc/NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
+++ /dev/null
@@ -1 +0,0 @@
-Disallow control characters in hostnames in http.client, addressing CVE-2019=
-18348. Such potentially malicious header injection URLs now cause a InvalidU=
RL to be raised.
\ No newline at end of file
diff --git a/Misc/NEWS.d/next/Security/2020-03-30-23-16-25.bpo-40121.p2LIio.r=
st b/Misc/NEWS.d/next/Security/2020-03-30-23-16-25.bpo-40121.p2LIio.rst
deleted file mode 100644
index 5aac6cd8b9959..0000000000000
--- a/Misc/NEWS.d/next/Security/2020-03-30-23-16-25.bpo-40121.p2LIio.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fixes audit events raised on creating a new socket.
diff --git a/Misc/NEWS.d/next/Tests/2019-10-17-00-49-38.bpo-38502.vUEic7.rst =
b/Misc/NEWS.d/next/Tests/2019-10-17-00-49-38.bpo-38502.vUEic7.rst
deleted file mode 100644
index 1df523e90c388..0000000000000
--- a/Misc/NEWS.d/next/Tests/2019-10-17-00-49-38.bpo-38502.vUEic7.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-test.regrtest now uses process groups in the multiprocessing mode (-jN comma=
nd
-line option) if process groups are available: if :func:`os.setsid` and
-:func:`os.killpg` functions are available.
diff --git a/Misc/NEWS.d/next/Tests/2019-10-30-00-01-43.bpo-37957.X1r78F.rst =
b/Misc/NEWS.d/next/Tests/2019-10-30-00-01-43.bpo-37957.X1r78F.rst
deleted file mode 100644
index 75e186ef33e07..0000000000000
--- a/Misc/NEWS.d/next/Tests/2019-10-30-00-01-43.bpo-37957.X1r78F.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-test.regrtest now can receive a list of test patterns to ignore (using the
--i/--ignore argument) or a file with a list of patterns to ignore (using the
---ignore-file argument). Patch by Pablo Galindo.
diff --git a/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst b=
/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst
deleted file mode 100644
index 7ffe90d55a4e7..0000000000000
--- a/Misc/NEWS.d/next/Tests/2019-11-25-21-46-47.bpo-1812.sAbTbY.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fix newline handling in doctest.testfile when loading from a package whose
-loader has a get_data method. Patch by Peter Donis.
diff --git a/Misc/NEWS.d/next/Tests/2020-02-29-12-58-17.bpo-39793.Og2SUN.rst =
b/Misc/NEWS.d/next/Tests/2020-02-29-12-58-17.bpo-39793.Og2SUN.rst
deleted file mode 100644
index 6fa0d15ba2fdc..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-02-29-12-58-17.bpo-39793.Og2SUN.rst
+++ /dev/null
@@ -1 +0,0 @@
-Use the same domain when testing ``make_msgid``. Patch by Batuhan Taskaya.
diff --git a/Misc/NEWS.d/next/Tests/2020-03-18-16-04-33.bpo-27807.9gKjET.rst =
b/Misc/NEWS.d/next/Tests/2020-03-18-16-04-33.bpo-27807.9gKjET.rst
deleted file mode 100644
index 3749a747c84b3..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-03-18-16-04-33.bpo-27807.9gKjET.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-``test_site.test_startup_imports()`` is now skipped if a path of
-:data:`sys.path` contains a ``.pth`` file.
diff --git a/Misc/NEWS.d/next/Tests/2020-03-20-00-30-36.bpo-40019.zOqHpQ.rst =
b/Misc/NEWS.d/next/Tests/2020-03-20-00-30-36.bpo-40019.zOqHpQ.rst
deleted file mode 100644
index a9d0b3970ae53..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-03-20-00-30-36.bpo-40019.zOqHpQ.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-test_gdb now skips tests if it detects that gdb failed to read debug
-information because the Python binary is optimized.
diff --git a/Misc/NEWS.d/next/Tests/2020-04-02-02-14-37.bpo-40146.J-Yo9G.rst =
b/Misc/NEWS.d/next/Tests/2020-04-02-02-14-37.bpo-40146.J-Yo9G.rst
deleted file mode 100644
index 216925f40e106..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-04-02-02-14-37.bpo-40146.J-Yo9G.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update OpenSSL to 1.1.1f in Azure Pipelines.
diff --git a/Misc/NEWS.d/next/Tests/2020-04-03-02-40-16.bpo-40162.v3pQW_.rst =
b/Misc/NEWS.d/next/Tests/2020-04-03-02-40-16.bpo-40162.v3pQW_.rst
deleted file mode 100644
index 8d5d0e0871d42..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-04-03-02-40-16.bpo-40162.v3pQW_.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update Travis CI configuration to OpenSSL 1.1.1f.
diff --git a/Misc/NEWS.d/next/Tests/2020-04-29-16-08-24.bpo-40436.gDMnYl.rst =
b/Misc/NEWS.d/next/Tests/2020-04-29-16-08-24.bpo-40436.gDMnYl.rst
deleted file mode 100644
index 0aee2c3aa2b4d..0000000000000
--- a/Misc/NEWS.d/next/Tests/2020-04-29-16-08-24.bpo-40436.gDMnYl.rst
+++ /dev/null
@@ -1 +0,0 @@
-test_gdb and test.pythoninfo now check gdb command exit code.
diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-03-07-18-01-30.bpo-39889.l1czT=
6.rst b/Misc/NEWS.d/next/Tools-Demos/2020-03-07-18-01-30.bpo-39889.l1czT6.rst
deleted file mode 100644
index 1202cb5fa064b..0000000000000
--- a/Misc/NEWS.d/next/Tools-Demos/2020-03-07-18-01-30.bpo-39889.l1czT6.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-Fixed ``unparse.py`` for extended slices containing a single element (e.g.
-``a[i:j,]``). Remove redundant tuples when index with a tuple (e.g. ``a[i,
-j]``).
diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-03-09-13-28-13.bpo-36184.BMPJ0=
D.rst b/Misc/NEWS.d/next/Tools-Demos/2020-03-09-13-28-13.bpo-36184.BMPJ0D.rst
deleted file mode 100644
index 2c845e7df7935..0000000000000
--- a/Misc/NEWS.d/next/Tools-Demos/2020-03-09-13-28-13.bpo-36184.BMPJ0D.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-Port python-gdb.py to FreeBSD. python-gdb.py now checks for "take_gil"
-function name to check if a frame tries to acquire the GIL, instead of
-checking for "pthread_cond_timedwait" which is specific to Linux and can be
-a different condition than the GIL.
diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-04-04-19-35-22.bpo-40179.u9FH1=
0.rst b/Misc/NEWS.d/next/Tools-Demos/2020-04-04-19-35-22.bpo-40179.u9FH10.rst
deleted file mode 100644
index 61bd2e3d94aab..0000000000000
--- a/Misc/NEWS.d/next/Tools-Demos/2020-04-04-19-35-22.bpo-40179.u9FH10.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fixed translation of ``#elif`` in Argument Clinic.
diff --git a/Misc/NEWS.d/next/Windows/2020-02-25-18-43-34.bpo-34803.S3VcS0.rs=
t b/Misc/NEWS.d/next/Windows/2020-02-25-18-43-34.bpo-34803.S3VcS0.rst
deleted file mode 100644
index 144ffd50af0e9..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-02-25-18-43-34.bpo-34803.S3VcS0.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Package for nuget.org now includes repository reference and bundled icon
-image.
diff --git a/Misc/NEWS.d/next/Windows/2020-02-28-22-46-09.bpo-39789.67XRoP.rs=
t b/Misc/NEWS.d/next/Windows/2020-02-28-22-46-09.bpo-39789.67XRoP.rst
deleted file mode 100644
index 077b0afcba3c1..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-02-28-22-46-09.bpo-39789.67XRoP.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update Windows release build machines to Visual Studio 2019 (MSVC 14.2).
diff --git a/Misc/NEWS.d/next/Windows/2020-02-28-23-51-27.bpo-38380.TpOBCj.rs=
t b/Misc/NEWS.d/next/Windows/2020-02-28-23-51-27.bpo-38380.TpOBCj.rst
deleted file mode 100644
index 521075d628f42..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-02-28-23-51-27.bpo-38380.TpOBCj.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update Windows builds to use SQLite 3.31.1
diff --git a/Misc/NEWS.d/next/Windows/2020-03-01-15-04-54.bpo-38597.MnHdYl.rs=
t b/Misc/NEWS.d/next/Windows/2020-03-01-15-04-54.bpo-38597.MnHdYl.rst
deleted file mode 100644
index 7f3a2e756c5a1..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-03-01-15-04-54.bpo-38597.MnHdYl.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-:mod:`distutils` will no longer statically link :file:`vcruntime140.dll`
-when a redistributable version is unavailable. All future releases of
-CPython will include a copy of this DLL to ensure distributed extensions can
-continue to load.
diff --git a/Misc/NEWS.d/next/Windows/2020-03-04-17-05-11.bpo-39847.C3N2m3.rs=
t b/Misc/NEWS.d/next/Windows/2020-03-04-17-05-11.bpo-39847.C3N2m3.rst
deleted file mode 100644
index acfbce53eb399..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-03-04-17-05-11.bpo-39847.C3N2m3.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Avoid hang when computer is hibernated whilst waiting for a mutex (for
-lock-related objects from :mod:`threading`) around 49-day uptime.
diff --git a/Misc/NEWS.d/next/Windows/2020-03-11-10-15-56.bpo-39930.LGHw1j.rs=
t b/Misc/NEWS.d/next/Windows/2020-03-11-10-15-56.bpo-39930.LGHw1j.rst
deleted file mode 100644
index c3011897b6dc8..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-03-11-10-15-56.bpo-39930.LGHw1j.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Ensures the required :file:`vcruntime140.dll` is included in install
-packages.
diff --git a/Misc/NEWS.d/next/Windows/2020-04-04-13-13-44.bpo-40164.SPrSn5.rs=
t b/Misc/NEWS.d/next/Windows/2020-04-04-13-13-44.bpo-40164.SPrSn5.rst
deleted file mode 100644
index 0bb874b138b33..0000000000000
--- a/Misc/NEWS.d/next/Windows/2020-04-04-13-13-44.bpo-40164.SPrSn5.rst
+++ /dev/null
@@ -1 +0,0 @@
-Updates Windows to OpenSSL 1.1.1f
diff --git a/Misc/NEWS.d/next/macOS/2020-02-28-23-51-47.bpo-38380.u-ySyA.rst =
b/Misc/NEWS.d/next/macOS/2020-02-28-23-51-47.bpo-38380.u-ySyA.rst
deleted file mode 100644
index 908281b5d172f..0000000000000
--- a/Misc/NEWS.d/next/macOS/2020-02-28-23-51-47.bpo-38380.u-ySyA.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update macOS builds to use SQLite 3.31.1
diff --git a/Misc/NEWS.d/next/macOS/2020-04-21-19-46-35.bpo-40164.6HA6IC.rst =
b/Misc/NEWS.d/next/macOS/2020-04-21-19-46-35.bpo-40164.6HA6IC.rst
deleted file mode 100644
index 05c568190e7d8..0000000000000
--- a/Misc/NEWS.d/next/macOS/2020-04-21-19-46-35.bpo-40164.6HA6IC.rst
+++ /dev/null
@@ -1 +0,0 @@
-Update macOS installer builds to use OpenSSL 1.1.1g.
diff --git a/README.rst b/README.rst
index cf74d1d8ee6b3..8bf81f0066f0f 100644
--- a/README.rst
+++ b/README.rst
@@ -1,5 +1,5 @@
-This is Python version 3.8.2
-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
+This is Python version 3.8.3rc1
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
=20
.. image:: https://travis-ci.org/python/cpython.svg?branch=3D3.8
:alt: CPython build status on Travis CI
[View Less]
1
0
https://github.com/python/cpython/commit/360371f79c48f15bbcee7aeecacf97a899…
commit: 360371f79c48f15bbcee7aeecacf97a899913b25
branch: master
author: karl ding <karlding(a)users.noreply.github.com>
committer: GitHub <noreply(a)github.com>
date: 2020-04-29T15:31:19-07:00
summary:
bpo-40291: Add support for CAN_J1939 sockets (GH-19538)
Add support for CAN_J1939 sockets that wrap SAE J1939 protocol
functionality provided by Linux 5.4+ kernels.
files:
A Misc/NEWS.d/next/Library/2020-…
[View More]04-14-22-31-27.bpo-40291._O8hXn.rst
M Doc/library/socket.rst
M Lib/test/test_socket.py
M Modules/socketmodule.c
M Modules/socketmodule.h
M configure
M configure.ac
M pyconfig.h.in
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 87dee1a801dea..d798c1a9d10a0 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -118,6 +118,10 @@ created. Socket addresses are represented as follows:
- :const:`CAN_ISOTP` protocol require a tuple ``(interface, rx_addr, tx_addr)``
where both additional parameters are unsigned long integer that represent a
CAN identifier (standard or extended).
+ - :const:`CAN_J1939` protocol require a tuple ``(interface, name, pgn, addr)``
+ where additional parameters are 64-bit unsigned integer representing the
+ ECU name, a 32-bit unsigned integer representing the Parameter Group Number
+ (PGN), and an 8-bit integer representing the address.
- A string or a tuple ``(id, unit)`` is used for the :const:`SYSPROTO_CONTROL`
protocol of the :const:`PF_SYSTEM` family. The string is the name of a
@@ -428,6 +432,15 @@ Constants
.. versionadded:: 3.7
+.. data:: CAN_J1939
+
+ CAN_J1939, in the CAN protocol family, is the SAE J1939 protocol.
+ J1939 constants, documented in the Linux documentation.
+
+ .. availability:: Linux >= 5.4.
+
+ .. versionadded:: 3.9
+
.. data:: AF_PACKET
PF_PACKET
@@ -544,7 +557,8 @@ The following functions all create :ref:`socket objects <socket-objects>`.
default), :const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other
``SOCK_`` constants. The protocol number is usually zero and may be omitted
or in the case where the address family is :const:`AF_CAN` the protocol
- should be one of :const:`CAN_RAW`, :const:`CAN_BCM` or :const:`CAN_ISOTP`.
+ should be one of :const:`CAN_RAW`, :const:`CAN_BCM`, :const:`CAN_ISOTP` or
+ :const:`CAN_J1939`.
If *fileno* is specified, the values for *family*, *type*, and *proto* are
auto-detected from the specified file descriptor. Auto-detection can be
@@ -588,6 +602,9 @@ The following functions all create :ref:`socket objects <socket-objects>`.
``SOCK_NONBLOCK``, but ``sock.type`` will be set to
``socket.SOCK_STREAM``.
+ .. versionchanged:: 3.9
+ The CAN_J1939 protocol was added.
+
.. function:: socketpair([family[, type[, proto]]])
Build a pair of connected socket objects using the given address family, socket
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 87ae2e127a236..4a436cf3c143a 100755
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -80,6 +80,16 @@ def _have_socket_can_isotp():
s.close()
return True
+def _have_socket_can_j1939():
+ """Check whether CAN J1939 sockets are supported on this host."""
+ try:
+ s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_J1939)
+ except (AttributeError, OSError):
+ return False
+ else:
+ s.close()
+ return True
+
def _have_socket_rds():
"""Check whether RDS sockets are supported on this host."""
try:
@@ -143,6 +153,8 @@ def socket_setdefaulttimeout(timeout):
HAVE_SOCKET_CAN_ISOTP = _have_socket_can_isotp()
+HAVE_SOCKET_CAN_J1939 = _have_socket_can_j1939()
+
HAVE_SOCKET_RDS = _have_socket_rds()
HAVE_SOCKET_ALG = _have_socket_alg()
@@ -2117,6 +2129,68 @@ def testBind(self):
raise
+(a)unittest.skipUnless(HAVE_SOCKET_CAN_J1939, 'CAN J1939 required for this test.')
+class J1939Test(unittest.TestCase):
+
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.interface = "vcan0"
+
+ @unittest.skipUnless(hasattr(socket, "CAN_J1939"),
+ 'socket.CAN_J1939 required for this test.')
+ def testJ1939Constants(self):
+ socket.CAN_J1939
+
+ socket.J1939_MAX_UNICAST_ADDR
+ socket.J1939_IDLE_ADDR
+ socket.J1939_NO_ADDR
+ socket.J1939_NO_NAME
+ socket.J1939_PGN_REQUEST
+ socket.J1939_PGN_ADDRESS_CLAIMED
+ socket.J1939_PGN_ADDRESS_COMMANDED
+ socket.J1939_PGN_PDU1_MAX
+ socket.J1939_PGN_MAX
+ socket.J1939_NO_PGN
+
+ # J1939 socket options
+ socket.SO_J1939_FILTER
+ socket.SO_J1939_PROMISC
+ socket.SO_J1939_SEND_PRIO
+ socket.SO_J1939_ERRQUEUE
+
+ socket.SCM_J1939_DEST_ADDR
+ socket.SCM_J1939_DEST_NAME
+ socket.SCM_J1939_PRIO
+ socket.SCM_J1939_ERRQUEUE
+
+ socket.J1939_NLA_PAD
+ socket.J1939_NLA_BYTES_ACKED
+
+ socket.J1939_EE_INFO_NONE
+ socket.J1939_EE_INFO_TX_ABORT
+
+ socket.J1939_FILTER_MAX
+
+ @unittest.skipUnless(hasattr(socket, "CAN_J1939"),
+ 'socket.CAN_J1939 required for this test.')
+ def testCreateJ1939Socket(self):
+ with socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_J1939) as s:
+ pass
+
+ def testBind(self):
+ try:
+ with socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_J1939) as s:
+ addr = self.interface, socket.J1939_NO_NAME, socket.J1939_NO_PGN, socket.J1939_NO_ADDR
+ s.bind(addr)
+ self.assertEqual(s.getsockname(), addr)
+ except OSError as e:
+ if e.errno == errno.ENODEV:
+ self.skipTest('network interface `%s` does not exist' %
+ self.interface)
+ else:
+ raise
+
+
@unittest.skipUnless(HAVE_SOCKET_RDS, 'RDS sockets required for this test.')
class BasicRDSTest(unittest.TestCase):
diff --git a/Misc/NEWS.d/next/Library/2020-04-14-22-31-27.bpo-40291._O8hXn.rst b/Misc/NEWS.d/next/Library/2020-04-14-22-31-27.bpo-40291._O8hXn.rst
new file mode 100644
index 0000000000000..a560ef12302bb
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-04-14-22-31-27.bpo-40291._O8hXn.rst
@@ -0,0 +1 @@
+Add support for CAN_J1939 sockets (available on Linux 5.4+)
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 9db8535eb3434..580ac0af5aff5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1556,6 +1556,16 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
a->can_addr.tp.tx_id);
}
#endif /* CAN_ISOTP */
+#ifdef CAN_J1939
+ case CAN_J1939:
+ {
+ return Py_BuildValue("O&KkB", PyUnicode_DecodeFSDefault,
+ ifname,
+ a->can_addr.j1939.name,
+ a->can_addr.j1939.pgn,
+ a->can_addr.j1939.addr);
+ }
+#endif /* CAN_J1939 */
default:
{
return Py_BuildValue("(O&)", PyUnicode_DecodeFSDefault,
@@ -2237,6 +2247,55 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
return 1;
}
#endif /* CAN_ISOTP */
+#ifdef CAN_J1939
+ case CAN_J1939:
+ {
+ PyObject *interfaceName;
+ struct ifreq ifr;
+ Py_ssize_t len;
+ uint64_t j1939_name;
+ uint32_t j1939_pgn;
+ uint8_t j1939_addr;
+
+ struct sockaddr_can *addr = &addrbuf->can;
+
+ if (!PyArg_ParseTuple(args, "O&KkB", PyUnicode_FSConverter,
+ &interfaceName,
+ &j1939_name,
+ &j1939_pgn,
+ &j1939_addr))
+ return 0;
+
+ len = PyBytes_GET_SIZE(interfaceName);
+
+ if (len == 0) {
+ ifr.ifr_ifindex = 0;
+ } else if ((size_t)len < sizeof(ifr.ifr_name)) {
+ strncpy(ifr.ifr_name, PyBytes_AS_STRING(interfaceName), sizeof(ifr.ifr_name));
+ ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
+ if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
+ s->errorhandler();
+ Py_DECREF(interfaceName);
+ return 0;
+ }
+ } else {
+ PyErr_SetString(PyExc_OSError,
+ "AF_CAN interface name too long");
+ Py_DECREF(interfaceName);
+ return 0;
+ }
+
+ addr->can_family = AF_CAN;
+ addr->can_ifindex = ifr.ifr_ifindex;
+ addr->can_addr.j1939.name = j1939_name;
+ addr->can_addr.j1939.pgn = j1939_pgn;
+ addr->can_addr.j1939.addr = j1939_addr;
+
+ *len_ret = sizeof(*addr);
+ Py_DECREF(interfaceName);
+ return 1;
+ }
+#endif /* CAN_J1939 */
default:
PyErr_Format(PyExc_OSError,
"%s(): unsupported CAN protocol", caller);
@@ -7687,6 +7746,9 @@ PyInit__socket(void)
#ifdef CAN_ISOTP
PyModule_AddIntMacro(m, CAN_ISOTP);
#endif
+#ifdef CAN_J1939
+ PyModule_AddIntMacro(m, CAN_J1939);
+#endif
#endif
#ifdef HAVE_LINUX_CAN_RAW_H
PyModule_AddIntMacro(m, CAN_RAW_FILTER);
@@ -7734,6 +7796,37 @@ PyInit__socket(void)
PyModule_AddIntConstant(m, "CAN_BCM_CAN_FD_FRAME", CAN_FD_FRAME);
#endif
#endif
+#ifdef HAVE_LINUX_CAN_J1939_H
+ PyModule_AddIntMacro(m, J1939_MAX_UNICAST_ADDR);
+ PyModule_AddIntMacro(m, J1939_IDLE_ADDR);
+ PyModule_AddIntMacro(m, J1939_NO_ADDR);
+ PyModule_AddIntMacro(m, J1939_NO_NAME);
+ PyModule_AddIntMacro(m, J1939_PGN_REQUEST);
+ PyModule_AddIntMacro(m, J1939_PGN_ADDRESS_CLAIMED);
+ PyModule_AddIntMacro(m, J1939_PGN_ADDRESS_COMMANDED);
+ PyModule_AddIntMacro(m, J1939_PGN_PDU1_MAX);
+ PyModule_AddIntMacro(m, J1939_PGN_MAX);
+ PyModule_AddIntMacro(m, J1939_NO_PGN);
+
+ /* J1939 socket options */
+ PyModule_AddIntMacro(m, SO_J1939_FILTER);
+ PyModule_AddIntMacro(m, SO_J1939_PROMISC);
+ PyModule_AddIntMacro(m, SO_J1939_SEND_PRIO);
+ PyModule_AddIntMacro(m, SO_J1939_ERRQUEUE);
+
+ PyModule_AddIntMacro(m, SCM_J1939_DEST_ADDR);
+ PyModule_AddIntMacro(m, SCM_J1939_DEST_NAME);
+ PyModule_AddIntMacro(m, SCM_J1939_PRIO);
+ PyModule_AddIntMacro(m, SCM_J1939_ERRQUEUE);
+
+ PyModule_AddIntMacro(m, J1939_NLA_PAD);
+ PyModule_AddIntMacro(m, J1939_NLA_BYTES_ACKED);
+
+ PyModule_AddIntMacro(m, J1939_EE_INFO_NONE);
+ PyModule_AddIntMacro(m, J1939_EE_INFO_TX_ABORT);
+
+ PyModule_AddIntMacro(m, J1939_FILTER_MAX);
+#endif
#ifdef SOL_RDS
PyModule_AddIntMacro(m, SOL_RDS);
#endif
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index 7684e59cd4546..ba2c9f5c31c3b 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -144,6 +144,10 @@ typedef int socklen_t;
#include <linux/can/bcm.h>
#endif
+#ifdef HAVE_LINUX_CAN_J1939_H
+#include <linux/can/j1939.h>
+#endif
+
#ifdef HAVE_SYS_SYS_DOMAIN_H
#include <sys/sys_domain.h>
#endif
diff --git a/configure b/configure
index 29d5f4ce66735..a8a35d0defc6b 100755
--- a/configure
+++ b/configure
@@ -8282,8 +8282,8 @@ fi
done
-# On Linux, can.h and can/raw.h require sys/socket.h
-for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
+# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
+for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
diff --git a/configure.ac b/configure.ac
index 240ddeb9b3d22..f996051efc719 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2236,8 +2236,8 @@ AC_CHECK_HEADERS(linux/vm_sockets.h,,,[
#endif
])
-# On Linux, can.h and can/raw.h require sys/socket.h
-AC_CHECK_HEADERS(linux/can.h linux/can/raw.h linux/can/bcm.h,,,[
+# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
+AC_CHECK_HEADERS(linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h,,,[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 76a10474208cf..75ac368aadafe 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -622,6 +622,9 @@
/* Define to 1 if you have the <linux/can.h> header file. */
#undef HAVE_LINUX_CAN_H
+/* Define to 1 if you have the <linux/can/j1939.h> header file. */
+#undef HAVE_LINUX_CAN_J1939_H
+
/* Define if compiling using Linux 3.6 or later. */
#undef HAVE_LINUX_CAN_RAW_FD_FRAMES
[View Less]
1
0
https://github.com/python/cpython/commit/fd33cdbd05d2fbe2443554a9b79155de07…
commit: fd33cdbd05d2fbe2443554a9b79155de07b0d056
branch: master
author: Alex Povel <48824213+alexpovel(a)users.noreply.github.com>
committer: GitHub <noreply(a)github.com>
date: 2020-04-29T19:17:12-03:00
summary:
Fix plural typo in documentation (GH-19799)
Co-authored-by: Alex Povel <python(a)alexpovel.de>
files:
M Doc/faq/design.rst
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
index …
[View More]df3dbf4977e01..4e3cc575ee196 100644
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -651,7 +651,7 @@ Why doesn't Python have a "with" statement for attribute assignments?
---------------------------------------------------------------------
Python has a 'with' statement that wraps the execution of a block, calling code
-on the entrance and exit from the block. Some language have a construct that
+on the entrance and exit from the block. Some languages have a construct that
looks like this::
with obj:
[View Less]
1
0

bpo-1635741: Port _stat module to multiphase initialization (GH-19798)
by Dong-hee Na April 29, 2020
by Dong-hee Na April 29, 2020
April 29, 2020
https://github.com/python/cpython/commit/84724dd239c30043616487812f6a710b1d…
commit: 84724dd239c30043616487812f6a710b1d70cd4b
branch: master
author: Dong-hee Na <donghee.na92(a)gmail.com>
committer: GitHub <noreply(a)github.com>
date: 2020-04-30T03:20:27+09:00
summary:
bpo-1635741: Port _stat module to multiphase initialization (GH-19798)
files:
A Misc/NEWS.d/next/Core and Builtins/2020-04-30-01-44-42.bpo-1635741.GKtjqr.rst
M Modules/_stat.c
diff --git a/Misc/NEWS.d/next/Core and …
[View More]Builtins/2020-04-30-01-44-42.bpo-1635741.GKtjqr.rst b/Misc/NEWS.d/next/Core and Builtins/2020-04-30-01-44-42.bpo-1635741.GKtjqr.rst
new file mode 100644
index 0000000000000..7b3c7511e139e
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-04-30-01-44-42.bpo-1635741.GKtjqr.rst
@@ -0,0 +1 @@
+Port _stat module to multiphase initialization (:pep:`489`).
diff --git a/Modules/_stat.c b/Modules/_stat.c
index 6a3020a00d114..45a4e080c7746 100644
--- a/Modules/_stat.c
+++ b/Modules/_stat.c
@@ -492,113 +492,140 @@ ST_CTIME\n\
");
+static int
+stat_exec(PyObject *module)
+{
+#define ADD_INT_MACRO(module, macro) \
+ do { \
+ if (PyModule_AddIntConstant(module, #macro, macro) < 0) { \
+ return -1; \
+ } \
+ } while (0)
+
+ ADD_INT_MACRO(module, S_IFDIR);
+ ADD_INT_MACRO(module, S_IFCHR);
+ ADD_INT_MACRO(module, S_IFBLK);
+ ADD_INT_MACRO(module, S_IFREG);
+ ADD_INT_MACRO(module, S_IFIFO);
+ ADD_INT_MACRO(module, S_IFLNK);
+ ADD_INT_MACRO(module, S_IFSOCK);
+ ADD_INT_MACRO(module, S_IFDOOR);
+ ADD_INT_MACRO(module, S_IFPORT);
+ ADD_INT_MACRO(module, S_IFWHT);
+
+ ADD_INT_MACRO(module, S_ISUID);
+ ADD_INT_MACRO(module, S_ISGID);
+ ADD_INT_MACRO(module, S_ISVTX);
+ ADD_INT_MACRO(module, S_ENFMT);
+
+ ADD_INT_MACRO(module, S_IREAD);
+ ADD_INT_MACRO(module, S_IWRITE);
+ ADD_INT_MACRO(module, S_IEXEC);
+
+ ADD_INT_MACRO(module, S_IRWXU);
+ ADD_INT_MACRO(module, S_IRUSR);
+ ADD_INT_MACRO(module, S_IWUSR);
+ ADD_INT_MACRO(module, S_IXUSR);
+
+ ADD_INT_MACRO(module, S_IRWXG);
+ ADD_INT_MACRO(module, S_IRGRP);
+ ADD_INT_MACRO(module, S_IWGRP);
+ ADD_INT_MACRO(module, S_IXGRP);
+
+ ADD_INT_MACRO(module, S_IRWXO);
+ ADD_INT_MACRO(module, S_IROTH);
+ ADD_INT_MACRO(module, S_IWOTH);
+ ADD_INT_MACRO(module, S_IXOTH);
+
+ ADD_INT_MACRO(module, UF_NODUMP);
+ ADD_INT_MACRO(module, UF_IMMUTABLE);
+ ADD_INT_MACRO(module, UF_APPEND);
+ ADD_INT_MACRO(module, UF_OPAQUE);
+ ADD_INT_MACRO(module, UF_NOUNLINK);
+ ADD_INT_MACRO(module, UF_COMPRESSED);
+ ADD_INT_MACRO(module, UF_HIDDEN);
+ ADD_INT_MACRO(module, SF_ARCHIVED);
+ ADD_INT_MACRO(module, SF_IMMUTABLE);
+ ADD_INT_MACRO(module, SF_APPEND);
+ ADD_INT_MACRO(module, SF_NOUNLINK);
+ ADD_INT_MACRO(module, SF_SNAPSHOT);
+
+ const char* st_constants[] = {
+ "ST_MODE",
+ "ST_INO",
+ "ST_DEV",
+ "ST_NLINK",
+ "ST_UID",
+ "ST_GID",
+ "ST_SIZE",
+ "ST_ATIME",
+ "ST_MTIME",
+ "ST_CTIME"
+ };
+
+ for (int i = 0; i < Py_ARRAY_LENGTH(st_constants); i++) {
+ if (PyModule_AddIntConstant(module, st_constants[i], i) < 0) {
+ return -1;
+ }
+ }
+
+#ifdef MS_WINDOWS
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_ARCHIVE);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_COMPRESSED);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_DEVICE);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_DIRECTORY);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_ENCRYPTED);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_HIDDEN);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_INTEGRITY_STREAM);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_NORMAL);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_NO_SCRUB_DATA);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_OFFLINE);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_READONLY);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_REPARSE_POINT);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_SPARSE_FILE);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_SYSTEM);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_TEMPORARY);
+ ADD_INT_MACRO(module, FILE_ATTRIBUTE_VIRTUAL);
+
+ if (PyModule_AddObject(module, "IO_REPARSE_TAG_SYMLINK",
+ PyLong_FromUnsignedLong(IO_REPARSE_TAG_SYMLINK)) < 0) {
+ return -1;
+ }
+ if (PyModule_AddObject(module, "IO_REPARSE_TAG_MOUNT_POINT",
+ PyLong_FromUnsignedLong(IO_REPARSE_TAG_MOUNT_POINT)) < 0) {
+ return -1;
+ }
+ if (PyModule_AddObject(module, "IO_REPARSE_TAG_APPEXECLINK",
+ PyLong_FromUnsignedLong(IO_REPARSE_TAG_APPEXECLINK)) < 0) {
+ return -1;
+ }
+#endif
+
+ return 0;
+}
+
+
+static PyModuleDef_Slot stat_slots[] = {
+ {Py_mod_exec, stat_exec},
+ {0, NULL}
+};
+
+
static struct PyModuleDef statmodule = {
PyModuleDef_HEAD_INIT,
- "_stat",
- module_doc,
- -1,
- stat_methods,
- NULL,
- NULL,
- NULL,
- NULL
+ .m_name = "_stat",
+ .m_doc = module_doc,
+ .m_size = 0,
+ .m_methods = stat_methods,
+ .m_slots = stat_slots,
};
+
PyMODINIT_FUNC
PyInit__stat(void)
{
- PyObject *m;
- m = PyModule_Create(&statmodule);
- if (m == NULL)
- return NULL;
-
- if (PyModule_AddIntMacro(m, S_IFDIR)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFCHR)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFBLK)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFREG)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFIFO)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFLNK)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFSOCK)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFDOOR)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFPORT)) return NULL;
- if (PyModule_AddIntMacro(m, S_IFWHT)) return NULL;
-
- if (PyModule_AddIntMacro(m, S_ISUID)) return NULL;
- if (PyModule_AddIntMacro(m, S_ISGID)) return NULL;
- if (PyModule_AddIntMacro(m, S_ISVTX)) return NULL;
- if (PyModule_AddIntMacro(m, S_ENFMT)) return NULL;
-
- if (PyModule_AddIntMacro(m, S_IREAD)) return NULL;
- if (PyModule_AddIntMacro(m, S_IWRITE)) return NULL;
- if (PyModule_AddIntMacro(m, S_IEXEC)) return NULL;
-
- if (PyModule_AddIntMacro(m, S_IRWXU)) return NULL;
- if (PyModule_AddIntMacro(m, S_IRUSR)) return NULL;
- if (PyModule_AddIntMacro(m, S_IWUSR)) return NULL;
- if (PyModule_AddIntMacro(m, S_IXUSR)) return NULL;
-
- if (PyModule_AddIntMacro(m, S_IRWXG)) return NULL;
- if (PyModule_AddIntMacro(m, S_IRGRP)) return NULL;
- if (PyModule_AddIntMacro(m, S_IWGRP)) return NULL;
- if (PyModule_AddIntMacro(m, S_IXGRP)) return NULL;
-
- if (PyModule_AddIntMacro(m, S_IRWXO)) return NULL;
- if (PyModule_AddIntMacro(m, S_IROTH)) return NULL;
- if (PyModule_AddIntMacro(m, S_IWOTH)) return NULL;
- if (PyModule_AddIntMacro(m, S_IXOTH)) return NULL;
-
- if (PyModule_AddIntMacro(m, UF_NODUMP)) return NULL;
- if (PyModule_AddIntMacro(m, UF_IMMUTABLE)) return NULL;
- if (PyModule_AddIntMacro(m, UF_APPEND)) return NULL;
- if (PyModule_AddIntMacro(m, UF_OPAQUE)) return NULL;
- if (PyModule_AddIntMacro(m, UF_NOUNLINK)) return NULL;
- if (PyModule_AddIntMacro(m, UF_COMPRESSED)) return NULL;
- if (PyModule_AddIntMacro(m, UF_HIDDEN)) return NULL;
- if (PyModule_AddIntMacro(m, SF_ARCHIVED)) return NULL;
- if (PyModule_AddIntMacro(m, SF_IMMUTABLE)) return NULL;
- if (PyModule_AddIntMacro(m, SF_APPEND)) return NULL;
- if (PyModule_AddIntMacro(m, SF_NOUNLINK)) return NULL;
- if (PyModule_AddIntMacro(m, SF_SNAPSHOT)) return NULL;
-
- if (PyModule_AddIntConstant(m, "ST_MODE", 0)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_INO", 1)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_DEV", 2)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_NLINK", 3)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_UID", 4)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_GID", 5)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_SIZE", 6)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_ATIME", 7)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_MTIME", 8)) return NULL;
- if (PyModule_AddIntConstant(m, "ST_CTIME", 9)) return NULL;
-
-#ifdef MS_WINDOWS
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_ARCHIVE)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_COMPRESSED)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_DEVICE)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_DIRECTORY)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_ENCRYPTED)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_HIDDEN)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_INTEGRITY_STREAM)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NORMAL)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NO_SCRUB_DATA)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_OFFLINE)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_READONLY)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_REPARSE_POINT)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_SPARSE_FILE)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_SYSTEM)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_TEMPORARY)) return NULL;
- if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_VIRTUAL)) return NULL;
-
- if (PyModule_AddObject(m, "IO_REPARSE_TAG_SYMLINK",
- PyLong_FromUnsignedLong(IO_REPARSE_TAG_SYMLINK))) return NULL;
- if (PyModule_AddObject(m, "IO_REPARSE_TAG_MOUNT_POINT",
- PyLong_FromUnsignedLong(IO_REPARSE_TAG_MOUNT_POINT))) return NULL;
- if (PyModule_AddObject(m, "IO_REPARSE_TAG_APPEXECLINK",
- PyLong_FromUnsignedLong(IO_REPARSE_TAG_APPEXECLINK))) return NULL;
-#endif
-
- return m;
+ return PyModuleDef_Init(&statmodule);
}
#ifdef __cplusplus
[View Less]
1
0