]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agoFix minor typo in comments in readline.c (GH-23911)
Jero Bado [Tue, 29 Dec 2020 12:26:57 +0000 (20:26 +0800)] 
Fix minor typo in comments in readline.c (GH-23911)

4 years agoAllow / character in username,password fields in _PROXY envvars. (#23973)
Senthil Kumaran [Tue, 29 Dec 2020 12:18:42 +0000 (04:18 -0800)] 
Allow / character in username,password fields in _PROXY envvars. (#23973)

4 years agobpo-41781: Fix typo in internal function name in typing (GH-23957)
Ross [Tue, 29 Dec 2020 11:55:28 +0000 (11:55 +0000)] 
bpo-41781: Fix typo in internal function name in typing (GH-23957)

4 years agoFix typo in NEWS (GH23958)
Zackery Spytz [Tue, 29 Dec 2020 11:50:22 +0000 (04:50 -0700)] 
Fix typo in NEWS (GH23958)

4 years agobpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Serhiy Storchaka [Tue, 29 Dec 2020 10:56:55 +0000 (12:56 +0200)] 
bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)

Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.

4 years agobpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)
Serhiy Storchaka [Tue, 29 Dec 2020 10:55:55 +0000 (12:55 +0200)] 
bpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)

Tk can internally support bignum even if Tkinter is built without
support of bignum.

4 years agobpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)
Zackery Spytz [Tue, 29 Dec 2020 04:12:37 +0000 (21:12 -0700)] 
bpo-42770: Fix a typo in the email.headerregistry docs (GH-23982)

Automerge-Triggered-By: GH:zware
4 years agobpo-42740: Support PEP 604, 612 for typing.py get_args and get_origin (GH-23942)
Ken Jin [Tue, 29 Dec 2020 02:26:19 +0000 (10:26 +0800)] 
bpo-42740: Support PEP 604, 612 for typing.py get_args and get_origin (GH-23942)

4 years agoFix compiler warnings regarding loss of data (GH-23983)
Pablo Galindo [Tue, 29 Dec 2020 00:28:09 +0000 (00:28 +0000)] 
Fix compiler warnings regarding loss of data (GH-23983)

4 years agoUse Py_NewRef in Modules/_struct.c (GH-23981)
Pablo Galindo [Mon, 28 Dec 2020 23:59:16 +0000 (23:59 +0000)] 
Use Py_NewRef in Modules/_struct.c (GH-23981)

4 years agobpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)
Ken Jin [Mon, 28 Dec 2020 20:06:19 +0000 (04:06 +0800)] 
bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963)

PR 1/2. Needs backport to 3.9.

4 years agobpo-42222: Modernize integer test/conversion in randrange() (#23064)
Raymond Hettinger [Mon, 28 Dec 2020 19:10:34 +0000 (11:10 -0800)] 
bpo-42222: Modernize integer test/conversion in randrange() (#23064)

4 years ago[workflow] Use MSVC problem matcher for Windows action build (GH-18532)
Ammar Askar [Mon, 28 Dec 2020 18:28:40 +0000 (13:28 -0500)] 
[workflow] Use MSVC problem matcher for Windows action build (GH-18532)

This makes warnings and errors from the compiler very prominent so this should help prevent warnings from sneaking into the code base and catch them in review. See https://discuss.python.org/t/using-github-problem-matchers-to-catch-warnings-early/4254 for more details

You can see a demo of this in action here: https://github.com/ammaraskar/cpython/pull/15/files#diff-9ba2eeca0f254ece0a9df4d7cb68e870

GCC and Sphinx matchers have previously been added in GH-18567 and GH-20325, respectively.

4 years agobpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975)
Erlend Egeberg Aasland [Mon, 28 Dec 2020 17:47:16 +0000 (18:47 +0100)] 
bpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975)

The typo did no damage, but it looks suspicious and confusing.
Introduced by GH-23136.

Skip news.

Automerge-Triggered-By: GH:pitrou
4 years agobpo-1635741: sqlite3: Fix ref leak introduced by commit bf64d90 (GH-23972)
Erlend Egeberg Aasland [Mon, 28 Dec 2020 02:09:26 +0000 (03:09 +0100)] 
bpo-1635741: sqlite3: Fix ref leak introduced by commit bf64d90 (GH-23972)

4 years agobpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 22:35:17 +0000 (23:35 +0100)] 
bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)

The `pages` argument default value now reflects the implementation.

4 years agobpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 11:05:33 +0000 (12:05 +0100)] 
bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)

4 years agobpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)
Erlend Egeberg Aasland [Sun, 27 Dec 2020 08:32:18 +0000 (09:32 +0100)] 
bpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)

4 years agobpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked...
Serhiy Storchaka [Sun, 27 Dec 2020 08:13:30 +0000 (10:13 +0200)] 
bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic linked with Tk >= 8.5 (GH-23955)

4 years agobpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953)
Victor Stinner [Sat, 26 Dec 2020 19:26:08 +0000 (20:26 +0100)] 
bpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953)

Call _PyType_Fini() in subinterpreters.

Fix reference leaks in subinterpreters.

4 years agoAdd small validator utility for PEG grammars (GH-23519)
Pablo Galindo [Sat, 26 Dec 2020 19:11:29 +0000 (19:11 +0000)] 
Add small validator utility for PEG grammars (GH-23519)

4 years agobpo-16396: fix BPO number in changelog (GH-23951)
Shantanu [Sat, 26 Dec 2020 15:36:56 +0000 (09:36 -0600)] 
bpo-16396: fix BPO number in changelog (GH-23951)

Automerge-Triggered-By: GH:jaraco
4 years agobpo-42748: test_asdl_parser now uses exec_module instead of load_module (#23954)
Dong-hee Na [Sat, 26 Dec 2020 13:25:21 +0000 (22:25 +0900)] 
bpo-42748: test_asdl_parser now uses exec_module instead of load_module (#23954)

4 years agobpo-40521: Per-interpreter interned strings (GH-20085)
Victor Stinner [Sat, 26 Dec 2020 01:58:33 +0000 (02:58 +0100)] 
bpo-40521: Per-interpreter interned strings (GH-20085)

Make the Unicode dictionary of interned strings compatible with
subinterpreters.

Remove the INTERN_NAME_STRINGS macro in typeobject.c: names are
always now interned (even if EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
macro is defined).

_PyUnicode_ClearInterned() now uses PyDict_Next() to no longer
allocate memory, to ensure that the interned dictionary is cleared.

4 years agobpo-42694: Prevent creating _curses_panel.panel (GH-23948)
Victor Stinner [Sat, 26 Dec 2020 01:17:46 +0000 (02:17 +0100)] 
bpo-42694: Prevent creating _curses_panel.panel (GH-23948)

Fix regression introduced in
commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code
to prevent creating a _curses_panel.panel instance directly.

4 years agobpo-42745: Make the type cache per-interpreter (GH-23947)
Victor Stinner [Sat, 26 Dec 2020 00:45:43 +0000 (01:45 +0100)] 
bpo-42745: Make the type cache per-interpreter (GH-23947)

Make the type attribute lookup cache per-interpreter.

Add private _PyType_InitCache() function, called by PyInterpreterState_New().

Continue to share next_version_tag between interpreters, since static
types are still shared by interpreters.

Remove MCACHE macro: the cache is no longer disabled if the
EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined.

4 years agoAdd convolve() to the itertools recipes (GH-23928)
Raymond Hettinger [Sat, 26 Dec 2020 00:43:20 +0000 (16:43 -0800)] 
Add convolve() to the itertools recipes (GH-23928)

4 years agobpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058)
Victor Stinner [Fri, 25 Dec 2020 23:41:46 +0000 (00:41 +0100)] 
bpo-39465: Fix _PyUnicode_FromId() for subinterpreters (GH-20058)

Make _PyUnicode_FromId() function compatible with subinterpreters.
Each interpreter now has an array of identifier objects (interned
strings decoded from UTF-8).

* Add PyInterpreterState.unicode.identifiers: array of identifiers
  objects.
* Add _PyRuntimeState.unicode_ids used to allocate unique indexes
  to _Py_Identifier.
* Rewrite the _Py_Identifier structure.

Microbenchmark on _PyUnicode_FromId(&PyId_a) with _Py_IDENTIFIER(a):

[ref] 2.42 ns +- 0.00 ns -> [atomic] 3.39 ns +- 0.00 ns: 1.40x slower

This change adds 1 ns per _PyUnicode_FromId() call in average.

4 years agoSync what's new in 3.9 with 3.9 branch (GH-23943)
Ken Jin [Fri, 25 Dec 2020 23:08:17 +0000 (07:08 +0800)] 
Sync what's new in 3.9 with 3.9 branch (GH-23943)

4 years agobpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. (gh-23929)
Eric Snow [Fri, 25 Dec 2020 22:57:30 +0000 (15:57 -0700)] 
bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. (gh-23929)

https://bugs.python.org/issue36876

4 years agoRename Tkinter tests for widget options (GH-23944)
Serhiy Storchaka [Fri, 25 Dec 2020 22:10:29 +0000 (00:10 +0200)] 
Rename Tkinter tests for widget options (GH-23944)

Every test for widget option starts now with "test_configure_"
to distinguish it from tests for widget commands.

4 years agobpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)
Desmond Cheong [Fri, 25 Dec 2020 21:18:06 +0000 (05:18 +0800)] 
bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)

4 years agobpo-42721: Improve using simple dialogs without root window (GH-23897)
Serhiy Storchaka [Fri, 25 Dec 2020 18:19:20 +0000 (20:19 +0200)] 
bpo-42721: Improve using simple dialogs without root window (GH-23897)

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-28964: add line number of node (if available) to ast.literal_eval error messages...
Irit Katriel [Fri, 25 Dec 2020 17:04:31 +0000 (17:04 +0000)] 
bpo-28964: add line number of node (if available) to ast.literal_eval error messages (GH-23677)

4 years agobpo-15303: Support widgets with boolean value False in Tkinter (GH-23904)
Serhiy Storchaka [Fri, 25 Dec 2020 15:04:26 +0000 (17:04 +0200)] 
bpo-15303: Support widgets with boolean value False in Tkinter (GH-23904)

Use `widget is None` instead of checking the boolean value of a widget.

4 years agobpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
Serhiy Storchaka [Fri, 25 Dec 2020 15:03:37 +0000 (17:03 +0200)] 
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)

It did not work because the signature of code object constructor
was changed. Also, it used old format of bytecode (pre-wordcode).

4 years agobpo-29076: Add fish support to macOS installer (GH-23302)
Erlend Egeberg Aasland [Fri, 25 Dec 2020 11:01:30 +0000 (12:01 +0100)] 
bpo-29076: Add fish support to macOS installer (GH-23302)

4 years agobpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
Gregory P. Smith [Fri, 25 Dec 2020 04:57:21 +0000 (20:57 -0800)] 
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)

When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True.  This
reconciles the behavior to be consistent and adds a test to guarantee it.

Also clarifies the existing check_output documentation.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
4 years agobpo-42727: Fix the NEWS entry .rst (GH-23932)
Gregory P. Smith [Fri, 25 Dec 2020 04:31:18 +0000 (20:31 -0800)] 
bpo-42727: Fix the NEWS entry .rst (GH-23932)

It was causing CI failures.  the offending file came from https://github.com/python/cpython/pull/23917

```
python3 tools/rstlint.py ../Misc/NEWS.d/next/
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:1: default role used
[2] ../Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst:2: default role used
2 problems with severity 2 found.
Makefile:204: recipe for target 'check' failed
```

4 years agobpo-42727: [Enum] use super() and include **kwds (GH-23927)
Ethan Furman [Fri, 25 Dec 2020 03:31:10 +0000 (19:31 -0800)] 
bpo-42727: [Enum] use super() and include **kwds (GH-23927)

for multiple inheritance support:

use super().new
pass **kwds to super().new

4 years agobpo-42685: Improve placing of simple query windows. (GH-23856)
Serhiy Storchaka [Thu, 24 Dec 2020 18:26:28 +0000 (20:26 +0200)] 
bpo-42685: Improve placing of simple query windows. (GH-23856)

* If parent is specified and mapped, the query widget is
  centered at the center of parent. Its position and size
  can be corrected so that it fits in the virtual root window.
* Otherwise it is centered at the center of the screen.

4 years ago[Enum] EnumMeta.__prepare__ now accepts **kwds (#23917)
Ethan Furman [Thu, 24 Dec 2020 18:05:02 +0000 (10:05 -0800)] 
[Enum] EnumMeta.__prepare__ now accepts **kwds (#23917)

4 years agobpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. (gh...
Eric Snow [Thu, 24 Dec 2020 18:04:19 +0000 (11:04 -0700)] 
bpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. (gh-23918)

This will help identify which C-API items will need to be updated for subinterpreter support.

https://bugs.python.org/issue36876

4 years agocloses bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
Augusto Hack [Thu, 24 Dec 2020 17:16:04 +0000 (18:16 +0100)] 
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)

On Fedora 31 gdb is using python 3.7.9, calling `proxyval` on an instance with a dictionary fails because of the `dict.iteritems` usage. This PR changes the code to be compatible with py2 and py3.

This changed seemed small enough to not need an issue and news blurb, if one is required please let me know.

Automerge-Triggered-By: GH:benjaminp
4 years agoGH: Add isidentical to the CODEOWNERS (GH-23923)
Batuhan Taskaya [Thu, 24 Dec 2020 11:30:46 +0000 (14:30 +0300)] 
GH: Add isidentical to the CODEOWNERS (GH-23923)

4 years agobpo-41559: Implement PEP 612 - Add ParamSpec and Concatenate to typing (#23702)
kj [Thu, 24 Dec 2020 04:33:48 +0000 (12:33 +0800)] 
bpo-41559: Implement PEP 612 - Add ParamSpec and Concatenate to typing (#23702)

4 years agobpo-38308: Add optional weighting to statistics.harmonic_mean() (GH-23914)
Raymond Hettinger [Thu, 24 Dec 2020 03:52:09 +0000 (19:52 -0800)] 
bpo-38308: Add optional weighting to statistics.harmonic_mean() (GH-23914)

4 years agobpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)
kj [Thu, 24 Dec 2020 02:47:40 +0000 (10:47 +0800)] 
bpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)

Added `__getitem__` for `_CallableGenericAlias` so that it returns a subclass (itself) of `types.GenericAlias` rather than the default behavior of returning a plain `types.GenericAlias`. This fixes `repr` issues occuring after `TypeVar` substitution arising from the previous behavior.

4 years agobpo-41960: Add globalns and localns parameters to inspect.signature and Signature...
Batuhan Taskaya [Wed, 23 Dec 2020 22:45:13 +0000 (01:45 +0300)] 
bpo-41960: Add globalns and localns parameters to inspect.signature and Signature.from_callable (GH-22583)

4 years agobpo-25246: Optimize deque.remove() (GH-23898)
Raymond Hettinger [Wed, 23 Dec 2020 19:45:06 +0000 (11:45 -0800)] 
bpo-25246: Optimize deque.remove() (GH-23898)

4 years agobpo-32381: pymain_run_command() uses PyCF_IGNORE_COOKIE (GH-23724)
Victor Stinner [Wed, 23 Dec 2020 18:16:56 +0000 (19:16 +0100)] 
bpo-32381: pymain_run_command() uses PyCF_IGNORE_COOKIE (GH-23724)

The coding cookie (ex: "# coding: latin1") is now ignored in the
command passed to the -c command line option.

Since pymain_run_command() uses UTF-8, pass PyCF_IGNORE_COOKIE
compiler flag to the parser.

pymain_run_python() no longer propages compiler flags between
function calls.

4 years agobpo-9694: Fix misleading phrase "optional arguments" (GH-23858)
Raymond Hettinger [Wed, 23 Dec 2020 17:40:56 +0000 (09:40 -0800)] 
bpo-9694: Fix misleading phrase "optional arguments" (GH-23858)

4 years agobpo-28468: Fix typo in _os_release_candidates (GH-23913)
Victor Stinner [Wed, 23 Dec 2020 16:35:53 +0000 (17:35 +0100)] 
bpo-28468: Fix typo in _os_release_candidates (GH-23913)

Automerge-Triggered-By: GH:tiran
4 years agobpo-42246: Don't eliminate jumps to jumps, if it will break PEP 626. (GH-23896)
Mark Shannon [Wed, 23 Dec 2020 11:43:10 +0000 (11:43 +0000)] 
bpo-42246: Don't eliminate jumps to jumps, if it will break PEP 626. (GH-23896)

4 years agoBPO-42703: Fix incorrect documentation links for asyncio.Event (GH-23881)
Matt Fowler [Wed, 23 Dec 2020 10:44:52 +0000 (05:44 -0500)] 
BPO-42703: Fix incorrect documentation links for asyncio.Event (GH-23881)

4 years agobpo-1635741: Port resource extension module to module state (GH-23462)
Christian Heimes [Wed, 23 Dec 2020 07:55:11 +0000 (08:55 +0100)] 
bpo-1635741: Port resource extension module to module state (GH-23462)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-42620: Improve socket.getsockname doc string (GH-23742)
Christian Heimes [Wed, 23 Dec 2020 07:25:57 +0000 (08:25 +0100)] 
bpo-42620: Improve socket.getsockname doc string (GH-23742)

Signed-off-by: Christian Heimes <christian@python.org>
4 years agobpo-39465: Add pycore_atomic_funcs.h header (GH-20766)
Victor Stinner [Wed, 23 Dec 2020 02:41:08 +0000 (03:41 +0100)] 
bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)

Add pycore_atomic_funcs.h internal header file: similar to
pycore_atomic.h but don't require to declare variables as atomic.

Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.

4 years agoFix typos in sysmodule (GH-23883)
Joannah Nanjekye [Tue, 22 Dec 2020 22:31:46 +0000 (18:31 -0400)] 
Fix typos in sysmodule (GH-23883)

4 years agobpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without...
Irit Katriel [Tue, 22 Dec 2020 19:53:09 +0000 (19:53 +0000)] 
bpo-34463: Make python tracebacks identical to C tracebacks for SyntaxErrors without a lineno (GH-23427)

4 years agobpo-29030: Document interaction between *choices* and *metavar*. (GH-23884)
Raymond Hettinger [Tue, 22 Dec 2020 17:24:26 +0000 (09:24 -0800)] 
bpo-29030: Document interaction between *choices* and *metavar*. (GH-23884)

4 years ago[doc] Fix missing commas in signatures (#23693)
Andre Delfino [Tue, 22 Dec 2020 16:02:52 +0000 (13:02 -0300)] 
[doc] Fix missing commas in signatures (#23693)

* Fix star in signatures

* Fix comma in signatures

4 years agobpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868)
erykoff [Tue, 22 Dec 2020 11:12:07 +0000 (03:12 -0800)] 
bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868)

Automerge-Triggered-By: GH:ronaldoussoren
4 years agobpo-39159: Declare error that might be raised from literal_eval (GH-19899)
Batuhan Taskaya [Tue, 22 Dec 2020 00:15:40 +0000 (03:15 +0300)] 
bpo-39159: Declare error that might be raised from literal_eval (GH-19899)

4 years agobpo-42008: Fix internal _random.Random() seeding for the one argument case (GH-22668)
AMIR [Mon, 21 Dec 2020 23:45:50 +0000 (03:15 +0330)] 
bpo-42008: Fix internal _random.Random() seeding for the one argument case (GH-22668)

4 years agoFix typo in docstring (GH-23515)
Fernando Toledo [Mon, 21 Dec 2020 14:06:31 +0000 (11:06 -0300)] 
Fix typo in docstring (GH-23515)

4 years agobpo-42634: Mark reraise after except blocks as artificial. (GH-23877)
Mark Shannon [Mon, 21 Dec 2020 13:53:50 +0000 (13:53 +0000)] 
bpo-42634: Mark reraise after except blocks as artificial. (GH-23877)

* Mark reraise after except blocks as artificial.

* Update importlib

* Update dis test.

4 years agobpo-35790: Correct the description of sys.exc_info() and add a code example (GH-11625)
Géry Ogam [Mon, 21 Dec 2020 13:13:08 +0000 (14:13 +0100)] 
bpo-35790: Correct the description of sys.exc_info() and add a code example (GH-11625)

4 years ago[WIP/RFC] bpo-15872: tests: remove oddity from test_rmtree_errors (GH-22967)
Daniel Hahler [Mon, 21 Dec 2020 06:38:02 +0000 (07:38 +0100)] 
[WIP/RFC] bpo-15872: tests: remove oddity from test_rmtree_errors (GH-22967)

This was added for (some) Windows buildbots back in 2012, and should
either not be necessary anymore, or it should probably get investigated
why "\*.*" gets added to filenames in the first place.

Ref:

Automerge-Triggered-By: GH:hynek
4 years agobpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)
pxinwr [Sun, 20 Dec 2020 22:27:42 +0000 (06:27 +0800)] 
bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)

4 years agobpo-42669: Document that `except` rejects nested tuples (GH-23822)
Colin Watson [Sun, 20 Dec 2020 18:24:10 +0000 (18:24 +0000)] 
bpo-42669: Document that `except` rejects nested tuples (GH-23822)

In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural.  For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:

    try:
        self.getInputValue()
        return True
    except (InputErrors, SomethingElse):
        return False

As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple.  However, the reference documentation was never updated to match this new restriction.  Make it clear that the definition is no longer recursive.

Automerge-Triggered-By: GH:ericvsmith
4 years agobpo-42572: Improve argparse docs for the type parameter. (GH-23849)
Raymond Hettinger [Sun, 20 Dec 2020 18:14:54 +0000 (10:14 -0800)] 
bpo-42572:  Improve argparse docs for the type parameter. (GH-23849)

4 years agobpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH...
Matti Picus [Sun, 20 Dec 2020 02:56:57 +0000 (04:56 +0200)] 
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
4 years agobpo-41724: Explain when the conversion is not possible with detect_types enabled...
sblondon [Sat, 19 Dec 2020 22:52:39 +0000 (23:52 +0100)] 
bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855)

* Explain when the conversion is not possible with detect_types enabled

4 years ago[doc] Mention with and except clauses in globals() (GH-13232)
Andre Delfino [Sat, 19 Dec 2020 15:48:06 +0000 (12:48 -0300)] 
[doc] Mention with and except clauses in globals() (GH-13232)

4 years agobpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)
Serhiy Storchaka [Sat, 19 Dec 2020 10:17:08 +0000 (12:17 +0200)] 
bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)

* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.

4 years agobpo-42470: Do not warn on sequences which are also sets in random.sample() (GH-23665)
masklinn [Sat, 19 Dec 2020 04:33:36 +0000 (05:33 +0100)] 
bpo-42470: Do not warn on sequences which are also sets in random.sample() (GH-23665)

4 years agoFixed typo in itertools documentation (GH-23816)
Casper Smet [Sat, 19 Dec 2020 04:28:21 +0000 (05:28 +0100)] 
Fixed typo in itertools documentation (GH-23816)

4 years agobpo-42559: Not that getrandbits() is non-negative. (GH-23843)
Raymond Hettinger [Sat, 19 Dec 2020 01:03:10 +0000 (17:03 -0800)] 
bpo-42559: Not that getrandbits() is non-negative. (GH-23843)

4 years agobpo-34805: Guarantee that __subclasses__() is in definition order. (GH-23844)
Raymond Hettinger [Sat, 19 Dec 2020 00:53:50 +0000 (16:53 -0800)] 
bpo-34805:  Guarantee that __subclasses__() is in definition order. (GH-23844)

4 years agobpo-24792: Fix zipimporter masking the cause of import errors (GH-22204)
Irit Katriel [Sat, 19 Dec 2020 00:09:54 +0000 (00:09 +0000)] 
bpo-24792: Fix zipimporter masking the cause of import errors (GH-22204)

zipimport's _unmarshal_code swallows import errors and then _get_module_code doesn't know the cause of the error, and returns the generic, and sometimes incorrect, 'could not find...'.

Automerge-Triggered-By: GH:brettcannon
4 years agobpo-36769: Document that fnmatch.filter supports any kind of iterable (#13039)
Andre Delfino [Fri, 18 Dec 2020 19:10:20 +0000 (16:10 -0300)] 
bpo-36769: Document that fnmatch.filter supports any kind of iterable (#13039)

4 years agobpo-34398: Allow glossary results to show up on search page (GH-8773)
Ammar Askar [Fri, 18 Dec 2020 19:00:51 +0000 (14:00 -0500)] 
bpo-34398: Allow glossary results to show up on search page (GH-8773)

4 years agobpo-42675: Document collections.abc.Callable changes (GH-23839)
kj [Fri, 18 Dec 2020 17:39:26 +0000 (01:39 +0800)] 
bpo-42675: Document collections.abc.Callable changes (GH-23839)

4 years agobpo-41891: ensure asyncio.wait_for waits for task completion (#22461)
Richard Kojedzinszky [Fri, 18 Dec 2020 17:26:04 +0000 (18:26 +0100)] 
bpo-41891: ensure asyncio.wait_for waits for task completion (#22461)

4 years agobpo-40956: Fix sqlite3 AC code (GH-23837)
Dong-hee Na [Fri, 18 Dec 2020 15:41:33 +0000 (00:41 +0900)] 
bpo-40956: Fix sqlite3 AC code (GH-23837)

4 years agobpo-40956: Convert _sqlite3.Connection to Argument Clinic (GH-23341)
Erlend Egeberg Aasland [Fri, 18 Dec 2020 14:25:35 +0000 (15:25 +0100)] 
bpo-40956: Convert _sqlite3.Connection to Argument Clinic (GH-23341)

4 years agobpo-17140: Document multiprocessing's ThreadPool (GH-23812)
Matt Wozniski [Fri, 18 Dec 2020 13:05:46 +0000 (08:05 -0500)] 
bpo-17140: Document multiprocessing's ThreadPool (GH-23812)

Up until now, the `multiprocessing.pool.ThreadPool` class has gone
undocumented, despite being a public class in multiprocessing that is
included in `multiprocessing.pool.__all__`.

4 years agobpo-42238: Check Misc/NEWS.d/next/ for reStructuredText issues. (GH-23802)
Julien Palard [Fri, 18 Dec 2020 09:48:08 +0000 (10:48 +0100)] 
bpo-42238: Check Misc/NEWS.d/next/ for reStructuredText issues. (GH-23802)

4 years agobpo-39096: Format specification documentation fixes for numeric types (GH-23575)
Mark Dickinson [Fri, 18 Dec 2020 09:24:06 +0000 (09:24 +0000)] 
bpo-39096: Format specification documentation fixes for numeric types (GH-23575)

4 years agobpo-1635741: Port _thread to multiphase init (GH-23811)
Victor Stinner [Fri, 18 Dec 2020 00:39:00 +0000 (01:39 +0100)] 
bpo-1635741: Port _thread to multiphase init (GH-23811)

Port the _thread extension module to the multiphase initialization
API (PEP 489) and convert its static types to heap types.

Add a traverse function to the lock type, so the garbage collector
can break reference cycles.

4 years agobpo-42199: Fix bytecode_helper assertNotInBytecode (#23031)
Max Bernstein [Fri, 18 Dec 2020 00:30:29 +0000 (16:30 -0800)] 
bpo-42199: Fix bytecode_helper assertNotInBytecode (#23031)

* bpo-42199: Fix bytecode_helper assertNotInBytecode

Add tests.

* 📜🤖 Added by blurb_it.

Co-authored-by: Dino Viehland <dinoviehland@fb.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 years agobpo-42670: Fix a missing word in the itertools.product() docs (GH-23823)
Zackery Spytz [Thu, 17 Dec 2020 20:24:43 +0000 (13:24 -0700)] 
bpo-42670: Fix a missing word in the itertools.product() docs (GH-23823)

4 years agobpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530)
pxinwr [Thu, 17 Dec 2020 19:22:29 +0000 (03:22 +0800)] 
bpo-31904: posixpath.expanduser() handles None user home on VxWorks (GH-23530)

4 years ago[doc] Fix a few margins due to bad markup (GH-23619)
Andre Delfino [Thu, 17 Dec 2020 17:25:55 +0000 (14:25 -0300)] 
[doc] Fix a few margins due to bad markup (GH-23619)

4 years agobpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly after...
Mark Shannon [Thu, 17 Dec 2020 13:55:28 +0000 (13:55 +0000)] 
bpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly after raising or reraising an exception (GH-23803)

* Ensure that f_lasti is set correctly after an exception is raised to conform to PEP 626.

* Update importlib

* Add NEWS.

4 years agobpo-26564: fix obsolete comment in traceback.c (GH-23819)
Irit Katriel [Thu, 17 Dec 2020 12:33:07 +0000 (12:33 +0000)] 
bpo-26564: fix obsolete comment in traceback.c (GH-23819)

4 years agobpo-31904: Skip some asyncio tests on VxWorks (#23815)
pxinwr [Thu, 17 Dec 2020 10:04:47 +0000 (18:04 +0800)] 
bpo-31904: Skip some asyncio tests on VxWorks (#23815)

4 years ago[doc] Fix erroneous backslashes in signatures and names (GH-23658)
Andre Delfino [Thu, 17 Dec 2020 01:37:28 +0000 (22:37 -0300)] 
[doc] Fix erroneous backslashes in signatures and names (GH-23658)

The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).

The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.

4 years agoCorrect referenced RFC number in cgi module (GH-22827)
Mike Lei [Thu, 17 Dec 2020 01:34:19 +0000 (01:34 +0000)] 
Correct referenced RFC number in cgi module (GH-22827)

The quoted sentence can be found from the last paragraph of RFC 2046, Section 5.1, while the content of RFC 2026 is unrelated to this module.