]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-41841: Revise header (GH-24633)
Terry Jan Reedy [Wed, 24 Feb 2021 02:24:33 +0000 (21:24 -0500)] 
bpo-41841: Revise header (GH-24633)

4 years agobpo-43283: Add IDLE doc paragraph about print speed (GH-24615)
Terry Jan Reedy [Wed, 24 Feb 2021 00:39:51 +0000 (19:39 -0500)] 
bpo-43283: Add IDLE doc paragraph about print speed (GH-24615)

Printing to IDLE's Shell is often slower than printing to a system
terminal, but it can be made faster by pre-formatting a single
string before printing.

4 years agobpo-43146: fix None-handling in single-arg traceback.print_exception(None) (GH-24629)
Irit Katriel [Tue, 23 Feb 2021 17:43:04 +0000 (17:43 +0000)] 
bpo-43146: fix None-handling in single-arg traceback.print_exception(None) (GH-24629)

(The previous commit fixed print_exception(None, None, None).)

4 years agobpo-43146: fix regression in traceback.print_exception(None) (GH-24463)
Irit Katriel [Tue, 23 Feb 2021 14:58:47 +0000 (14:58 +0000)] 
bpo-43146: fix regression in traceback.print_exception(None) (GH-24463)

4 years agobpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551)
Petr Viktorin [Tue, 23 Feb 2021 12:23:56 +0000 (13:23 +0100)] 
bpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551)

4 years agobpo-36346: Document removal schedule of deprecate APIs (GH-20879)
Inada Naoki [Mon, 22 Feb 2021 23:06:51 +0000 (08:06 +0900)] 
bpo-36346: Document removal schedule of deprecate APIs (GH-20879)

We will remove wstr cache in Python 3.12. See PEP 623.

4 years agobpo-36346: Emit DeprecationWarning for PyArg_Parse() with 'u' or 'Z'. (GH-20927)
Inada Naoki [Mon, 22 Feb 2021 13:11:48 +0000 (22:11 +0900)] 
bpo-36346: Emit DeprecationWarning for PyArg_Parse() with 'u' or 'Z'. (GH-20927)

Emit DeprecationWarning when PyArg_Parse*() is called with 'u', 'Z' format.

See PEP 623.

4 years agobpo-23882: Doc: Clarify unittest discovery document (GH-21560)
Inada Naoki [Mon, 22 Feb 2021 06:14:26 +0000 (15:14 +0900)] 
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)

Unittest discovery support namespace package as start
directory. But it doesn't find namespace package in
the start directory automatically.

Otherwise, unittest discovery search into unexpected
directories like `vendor/` or `node_modules/`.

4 years agobpo-42808: Add PyType_Type.tp_vectorcall for type(obj) performance (GH-24058)
Dennis Sweeney [Mon, 22 Feb 2021 02:59:16 +0000 (21:59 -0500)] 
bpo-42808: Add PyType_Type.tp_vectorcall for type(obj) performance (GH-24058)

4 years agobpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)
Inada Naoki [Sun, 21 Feb 2021 23:29:30 +0000 (08:29 +0900)] 
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)

When very large data remains in TextIOWrapper, flush() may fail forever.

So prevent that data larger than chunk_size is remained in TextIOWrapper internal
buffer.

Co-Authored-By: Eryk Sun
4 years agoFix failed merge of bpo-43288. (GH-24614)
Neil Schemenauer [Sun, 21 Feb 2021 22:22:14 +0000 (14:22 -0800)] 
Fix failed merge of bpo-43288. (GH-24614)

4 years agobpo-43288: Fix bug in test_importlib test. (GH-24612)
Neil Schemenauer [Sun, 21 Feb 2021 21:48:18 +0000 (13:48 -0800)] 
bpo-43288: Fix bug in test_importlib test. (GH-24612)

4 years agobpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582)
Victor Stinner [Sun, 21 Feb 2021 11:02:04 +0000 (12:02 +0100)] 
bpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582)

* No longer save/restore the current exception. It is no longer used
  with an exception raised.
* No longer clear the current exception on error: it's now up to the
  caller.

4 years agobpo-43269: Remove redundant extern keywords (GH-24605)
Erlend Egeberg Aasland [Sun, 21 Feb 2021 10:07:49 +0000 (11:07 +0100)] 
bpo-43269: Remove redundant extern keywords (GH-24605)

4 years agobpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)
Terry Jan Reedy [Sun, 21 Feb 2021 07:44:11 +0000 (02:44 -0500)] 
bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)

In the Running User Code section, gather together paragraphs about two
processes and the sys.stdstream replacements, preparing to add another.

4 years agobpo-27646: Say that 'yield from' expression can be any iterable (GH-24595)
Terry Jan Reedy [Sun, 21 Feb 2021 02:33:25 +0000 (21:33 -0500)] 
bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595)

Previously, the doc at least strongly implied that it had to be an iterator.

4 years agobpo-43269: Clean up sqlite3 file scope (GH-24578)
Erlend Egeberg Aasland [Sun, 21 Feb 2021 00:29:19 +0000 (01:29 +0100)] 
bpo-43269: Clean up sqlite3 file scope (GH-24578)

4 years agobpo-43277: Add PySet_CheckExact to the C-API (GH-24598)
Pablo Galindo [Sat, 20 Feb 2021 18:03:08 +0000 (18:03 +0000)] 
bpo-43277: Add PySet_CheckExact to the C-API (GH-24598)

For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact.

4 years agobpo-42990: Functions inherit current builtins (GH-24564)
Victor Stinner [Sat, 20 Feb 2021 14:17:18 +0000 (15:17 +0100)] 
bpo-42990: Functions inherit current builtins (GH-24564)

The types.FunctionType constructor now inherits the current builtins
if the globals dictionary has no "__builtins__" key, rather than
using {"None": None} as builtins: same behavior as eval() and exec()
functions.

Defining a function with "def function(...): ..." in Python is not
affected, globals cannot be overriden with this syntax: it also
inherits the current builtins.

PyFrame_New(), PyEval_EvalCode(), PyEval_EvalCodeEx(),
PyFunction_New() and PyFunction_NewWithQualName() now inherits the
current builtins namespace if the globals dictionary has no
"__builtins__" key.

* Add _PyEval_GetBuiltins() function.
* _PyEval_BuiltinsFromGlobals() now uses _PyEval_GetBuiltins() if
  builtins cannot be found in globals.
* Add tstate parameter to _PyEval_BuiltinsFromGlobals().

4 years agoFix typo in launcher.c (GH-24497)
Ikko Ashimine [Sat, 20 Feb 2021 10:03:50 +0000 (19:03 +0900)] 
Fix typo in launcher.c (GH-24497)

4 years agoFix typo in dis module doc (GH-24509)
Irit Katriel [Sat, 20 Feb 2021 04:22:37 +0000 (04:22 +0000)] 
Fix typo in dis module doc (GH-24509)

4 years agobpo-43042: Augment tutorial sentence (GH-24514)
Terry Jan Reedy [Sat, 20 Feb 2021 00:26:21 +0000 (19:26 -0500)] 
bpo-43042: Augment tutorial sentence (GH-24514)

Calling same function also gets new local namespace.

4 years agobpo-42825: Enable /OPT:REF (GH-24098)
Austin Lamb [Fri, 19 Feb 2021 23:27:01 +0000 (15:27 -0800)] 
bpo-42825: Enable /OPT:REF (GH-24098)

We explicitly disable /OPT:ICF as some manual optimisations depend on some functions still having distinct pointers (such as wrap_binary_func and wrap_binary_func_l).

4 years agocloses bpo-43266: Improve array formatting. (GH-24573)
Erlend Egeberg Aasland [Fri, 19 Feb 2021 15:32:31 +0000 (16:32 +0100)] 
closes bpo-43266: Improve array formatting. (GH-24573)

4 years agobpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)
Nicholas Sim [Fri, 19 Feb 2021 14:55:46 +0000 (22:55 +0800)] 
bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)

Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.

Parser: peg_api: include Python.h instead of parser_interface.h.

4 years agobpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583)
Victor Stinner [Fri, 19 Feb 2021 14:51:36 +0000 (15:51 +0100)] 
bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583)

Cleanup also the code.

4 years agobpo-43268: Pass interp rather than tstate to internal functions (GH-24580)
Victor Stinner [Fri, 19 Feb 2021 14:10:45 +0000 (15:10 +0100)] 
bpo-43268: Pass interp rather than tstate to internal functions (GH-24580)

Pass the current interpreter (interp) rather than the current Python
thread state (tstate) to internal functions which only use the
interpreter.

Modified functions:

* _PyXXX_Fini() and _PyXXX_ClearFreeList() functions
* _PyEval_SignalAsyncExc(), make_pending_calls()
* _PySys_GetObject(), sys_set_object(), sys_set_object_id(), sys_set_object_str()
* should_audit(), set_flags_from_config(), make_flags()
* _PyAtExit_Call()
* init_stdio_encoding()
* etc.

4 years agobpo-43270: Remove private _PyErr_OCCURRED() macro (GH-24579)
Victor Stinner [Fri, 19 Feb 2021 14:08:54 +0000 (15:08 +0100)] 
bpo-43270: Remove private _PyErr_OCCURRED() macro (GH-24579)

Remove the private _PyErr_OCCURRED() macro: use the public
PyErr_Occurred() function instead.

CPython internals must use the internal _PyErr_Occurred(tstate)
function instead: it is the most efficient way to check if an
exception was raised.

4 years agobpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581)
Victor Stinner [Fri, 19 Feb 2021 14:07:59 +0000 (15:07 +0100)] 
bpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581)

Remove explicit tstate usage in sysmodule.c when it's only used raise
exceptions: get it implicitly using PyErr_XXX() functions.

4 years agobpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)
Victor Stinner [Fri, 19 Feb 2021 12:33:31 +0000 (13:33 +0100)] 
bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)

The _Py_IsMainInterpreter() function now expects interp rather than
tstate.

4 years agobpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575)
Victor Stinner [Fri, 19 Feb 2021 12:21:51 +0000 (13:21 +0100)] 
bpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575)

Use directly the PyThreadState_Get() function in public header files,
since PyThreadState_GET() macro is just an alias to it in pratice in
these files.

4 years agobpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() (GH-24576)
Victor Stinner [Fri, 19 Feb 2021 12:21:28 +0000 (13:21 +0100)] 
bpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() (GH-24576)

Replace _PyThreadState_GET() with _PyInterpreterState_GET() in
functions which only need the current interpreter, but don't need the
current Python thread state.

Replace also _PyThreadState_UncheckedGet() with _PyThreadState_GET()
in faulthandler.c, since _PyThreadState_UncheckedGet() is just an
alias to _PyThreadState_GET() in practice.

4 years agobpo-43258: Make sqlite3 callback functions static (GH-24574)
Erlend Egeberg Aasland [Fri, 19 Feb 2021 11:59:24 +0000 (12:59 +0100)] 
bpo-43258: Make sqlite3 callback functions static (GH-24574)

4 years agobpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569)
Erlend Egeberg Aasland [Fri, 19 Feb 2021 11:20:32 +0000 (12:20 +0100)] 
bpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569)

4 years agocloses bpo-43254: Fix *snprintf() man page refs. (GH-24563)
Erlend Egeberg Aasland [Fri, 19 Feb 2021 01:53:33 +0000 (02:53 +0100)] 
closes bpo-43254: Fix *snprintf() man page refs. (GH-24563)

4 years agobpo-39448: Add regen-frozen makefile target. (GH-18174)
Neil Schemenauer [Fri, 19 Feb 2021 00:49:12 +0000 (16:49 -0800)] 
bpo-39448: Add regen-frozen makefile target. (GH-18174)

Add the "regen-frozen" makefile target that regenerates the code for the
frozen __hello__ module.

4 years agoRemove all links to mingw.org (GH-24552)
Jeremy Paige [Thu, 18 Feb 2021 19:43:35 +0000 (11:43 -0800)] 
Remove all links to mingw.org (GH-24552)

This lease on this domain has lapsed. This not only makes these dead links, but a potential attack vector for readers of python.org as the domain can be obtained by an untrustworthy party.

I considered redirecting these links to http://mingw-w64.org/ which is a maintained fork of mingw, but beyond my unfamiliarity with the exact level of compatibility, at the time of this PR that site had an expired cert and so is not much of a vulnerability fix.

Automerge-Triggered-By: GH:Mariatta
4 years agobpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)
Victor Stinner [Thu, 18 Feb 2021 18:20:16 +0000 (19:20 +0100)] 
bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566)

* Refactor _PyFrame_New_NoTrack() and PyFunction_NewWithQualName()
  code.
* PyFrame_New() checks for _PyEval_BuiltinsFromGlobals() failure.
* Fix a ref leak in _PyEval_BuiltinsFromGlobals() error path.
* Complete PyFunction_GetModule() documentation: it returns a
  borrowed reference and it can return NULL.
* Move _PyEval_BuiltinsFromGlobals() definition to the internal C
  API.
* PyFunction_NewWithQualName() uses _Py_IDENTIFIER() API for the
  "__name__" string to make it compatible with subinterpreters.

4 years agobpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565)
Erlend Egeberg Aasland [Thu, 18 Feb 2021 17:13:14 +0000 (18:13 +0100)] 
bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565)

4 years agobpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562)
Erlend Egeberg Aasland [Thu, 18 Feb 2021 15:44:43 +0000 (16:44 +0100)] 
bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562)

4 years agobpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251)
David CARLIER [Thu, 18 Feb 2021 15:26:20 +0000 (15:26 +0000)] 
bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251)

4 years agobpo-42990: Add __builtins__ attribute to functions (GH-24559)
Victor Stinner [Thu, 18 Feb 2021 11:35:37 +0000 (12:35 +0100)] 
bpo-42990: Add __builtins__ attribute to functions (GH-24559)

Expose the new PyFunctionObject.func_builtins member in Python as a
new __builtins__ attribute on functions.

Document also the behavior change in What's New in Python 3.10.

4 years agobpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)
Nicholas Sim [Wed, 17 Feb 2021 18:30:31 +0000 (02:30 +0800)] 
bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)

Move non-limited C API headers pyarena.h and pyctype.h
into Include/cpython/ directory.

4 years ago bpo-40170: Move 3 NEWS entries to the C API section (GH-24555)
Erlend Egeberg Aasland [Wed, 17 Feb 2021 18:15:39 +0000 (19:15 +0100)] 
 bpo-40170: Move 3 NEWS entries to the C API section (GH-24555)

4 years agobpo-40170: Always define PyExceptionClass_Name() as a function (GH-24553)
Erlend Egeberg Aasland [Wed, 17 Feb 2021 10:51:08 +0000 (11:51 +0100)] 
bpo-40170: Always define PyExceptionClass_Name() as a function (GH-24553)

Remove macro variant of PyExceptionClass_Name().

4 years agobpo-43103: Add configure --without-static-libpython (GH-24418)
Victor Stinner [Wed, 17 Feb 2021 10:14:42 +0000 (11:14 +0100)] 
bpo-43103: Add configure --without-static-libpython (GH-24418)

Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.

Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.

4 years agoUpdate urllib2.rst (GH-24236)
Christian Reich [Wed, 17 Feb 2021 00:47:02 +0000 (01:47 +0100)] 
Update urllib2.rst (GH-24236)

fixed a minor glitch in the order of two words.

4 years agobpo-40170: Always define PyIter_Check() as a function (GH-24548)
Erlend Egeberg Aasland [Tue, 16 Feb 2021 15:05:58 +0000 (16:05 +0100)] 
bpo-40170: Always define PyIter_Check() as a function (GH-24548)

4 years agobpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)
Nicholas Sim [Tue, 16 Feb 2021 12:04:38 +0000 (20:04 +0800)] 
bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)

This change is backward compatible since C extension modules
must not include "pytime.h" directly, but only include "Python.h".

4 years agobpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)
Erlend Egeberg Aasland [Tue, 16 Feb 2021 07:50:00 +0000 (08:50 +0100)] 
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)

4 years agobpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500)
Zackery Spytz [Tue, 16 Feb 2021 00:14:13 +0000 (17:14 -0700)] 
bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500)

4 years agobpo-42819, readline: Disable bracketed paste (GH-24108)
Dustin Rodrigues [Mon, 15 Feb 2021 23:28:24 +0000 (18:28 -0500)] 
bpo-42819, readline: Disable bracketed paste (GH-24108)

4 years agoAdd a warning block around the get_referrers() documentation (GH-24511)
Pablo Galindo [Mon, 15 Feb 2021 23:03:38 +0000 (23:03 +0000)] 
Add a warning block around the get_referrers() documentation (GH-24511)

4 years agobpo-43231: Correctly calculate the curses color pair limit when checking for it ...
Pablo Galindo [Mon, 15 Feb 2021 22:15:49 +0000 (22:15 +0000)] 
bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541)

4 years agobpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R ...
Pablo Galindo [Mon, 15 Feb 2021 21:35:48 +0000 (21:35 +0000)] 
bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R (GH-24539)

4 years agobpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)
Ken Jin [Mon, 15 Feb 2021 17:00:20 +0000 (01:00 +0800)] 
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)

4 years agobpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)
Erlend Egeberg Aasland [Mon, 15 Feb 2021 16:19:24 +0000 (17:19 +0100)] 
bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)

4 years agobpo-42967: only use '&' as a query string separator (#24297)
Adam Goldschmidt [Sun, 14 Feb 2021 22:41:57 +0000 (00:41 +0200)] 
bpo-42967: only use '&' as a query string separator (#24297)

bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().

urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.

Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
4 years agobpo-43210: Fix byteswap comment in sha512.module.c (GH-24518)
Erlend Egeberg Aasland [Sun, 14 Feb 2021 14:14:26 +0000 (15:14 +0100)] 
bpo-43210: Fix byteswap comment in sha512.module.c (GH-24518)

4 years agobpo-43152: Update assert statement to remove unused warning (GH-24473)
Dong-hee Na [Sun, 14 Feb 2021 06:54:39 +0000 (15:54 +0900)] 
bpo-43152: Update assert statement to remove unused warning (GH-24473)

4 years agobpo-43202: More codeop._maybe_compile clean-ups (GH-24512)
Terry Jan Reedy [Sat, 13 Feb 2021 06:49:18 +0000 (01:49 -0500)] 
bpo-43202: More codeop._maybe_compile clean-ups (GH-24512)

Add comment, end others with period, remove unused variables,
initialize others only when needed, and add explicit return.

4 years agobpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505)
Zackery Spytz [Sat, 13 Feb 2021 04:57:12 +0000 (21:57 -0700)] 
bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-43172: readline now passes its tests when built against libedit (GH-24499)
Gregory P. Smith [Fri, 12 Feb 2021 20:04:46 +0000 (12:04 -0800)] 
bpo-43172: readline now passes its tests when built against libedit (GH-24499)

bpo-43172: readline now passes its tests when built against libedit.

Existing irreconcilable API differences remain in readline.get_begidx
and readline.get_endidx behavior based on libreadline vs libedit use.
A note about that has been documented.

4 years agobpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507)
Erlend Egeberg Aasland [Fri, 12 Feb 2021 10:34:11 +0000 (11:34 +0100)] 
bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507)

Automerge-Triggered-By: GH:tiran
4 years agobpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)
Terry Jan Reedy [Fri, 12 Feb 2021 00:31:10 +0000 (19:31 -0500)] 
bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)

The return used to be after code that was ignored when there was a code object.

4 years agobpo-43174: Windows: Use /utf-8 compiler option. (GH-24498)
Inada Naoki [Fri, 12 Feb 2021 00:06:47 +0000 (09:06 +0900)] 
bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498)

4 years agobpo-40956: Fix segfault when Connection.backup is called without target (GH-24503)
Erlend Egeberg Aasland [Wed, 10 Feb 2021 23:04:02 +0000 (00:04 +0100)] 
bpo-40956: Fix segfault when Connection.backup is called without target (GH-24503)

4 years agoFix link to sqlite3 enable_shared_cache documentation (GH-24496)
Tom Forbes [Wed, 10 Feb 2021 17:56:16 +0000 (17:56 +0000)] 
Fix link to sqlite3 enable_shared_cache documentation (GH-24496)

4 years agobpo-42217: compiler: merge same co_code and co_linetable objects (GH-23056)
Inada Naoki [Wed, 10 Feb 2021 00:20:42 +0000 (09:20 +0900)] 
bpo-42217: compiler: merge same co_code and co_linetable objects (GH-23056)

4 years agobpo-43163: Handle unclosed parentheses in codeop (GH-24483)
Pablo Galindo [Tue, 9 Feb 2021 20:07:38 +0000 (20:07 +0000)] 
bpo-43163: Handle unclosed parentheses in codeop (GH-24483)

4 years agobpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485)
Steve Dower [Tue, 9 Feb 2021 18:13:36 +0000 (18:13 +0000)] 
bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485)

This ensures that ceval.c can be debugged.
Also remove some irrelevant options from the pragma.

4 years agobpo-41824: Add versionadded for typing.ForwardRef docs (#24224)
Ken Jin [Tue, 9 Feb 2021 01:58:50 +0000 (09:58 +0800)] 
bpo-41824: Add versionadded for typing.ForwardRef docs (#24224)

4 years agoImprove docs of PEP 604 Union (#24301)
Ken Jin [Tue, 9 Feb 2021 01:57:11 +0000 (09:57 +0800)] 
Improve docs of PEP 604 Union (#24301)

4 years agobpo-43162: [Enum] deprecate enum member.member access (GH-24486)
Ethan Furman [Tue, 9 Feb 2021 01:32:38 +0000 (17:32 -0800)] 
bpo-43162: [Enum] deprecate enum member.member access (GH-24486)

In 3.5 (?) a speed optimization made it possible to access members as
attributes of other members, i.e. ``Color.RED.BLUE``.  This was always
discouraged in the docs, and other recent optimizations has made that
one no longer necessary.  Because some may be relying on it anyway, it
is being deprecated in 3.10, and will be removed in 3.11.

4 years agobpo-13501: allow choosing between readline and libedit (GH-24189)
Roland Hieber [Tue, 9 Feb 2021 01:05:25 +0000 (02:05 +0100)] 
bpo-13501: allow choosing between readline and libedit (GH-24189)

In contrast to macOS, libedit is available as its own include file and
library on Linux systems to prevent file name clashes. So if both
libraries are available on the system, readline is currently chosen by
default; and if only libedit is available, it is not found at all. This
patch adds a way to link against libedit by adding the following
arguments to configure:

  --with-readline           link against libreadline (the default)
  --with-readline=editline  link against libeditline
  --with-readline=no        disable building the readline module
  --without-readline        (same)

The runtime detection of libedit vs. readline was already done in commit
7105319ada2e66365902 (2019-12-04, serge-sans-paille: "bpo-38634: Allow
non-apple build to cope with libedit (GH-16986)").

Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline")
Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD")
Co-authored-by: Enji Cooper (ngie-eign)
Co-authored-by: Martin Panter (vadmium)
Co-authored-by: Robert Marshall (kellinm)
4 years agobpo-40692: Run more test_concurrent_futures tests (GH-20239)
Asheesh Laroia [Mon, 8 Feb 2021 03:15:51 +0000 (19:15 -0800)] 
bpo-40692: Run more test_concurrent_futures tests (GH-20239)

In the case of multiprocessing.synchronize() being missing, the
test_concurrent_futures test suite now skips only the tests that
require multiprocessing.synchronize().

Validate that multiprocessing.synchronize exists as part of
_check_system_limits(), allowing ProcessPoolExecutor to raise
NotImplementedError during __init__, rather than crashing with
ImportError during __init__ when creating a lock imported from
multiprocessing.synchronize.

Use _check_system_limits() to disable tests of
ProcessPoolExecutor on systems without multiprocessing.synchronize.

Running the test suite without multiprocessing.synchronize reveals
that Lib/compileall.py crashes when it uses a ProcessPoolExecutor.
Therefore, change Lib/compileall.py to call _check_system_limits()
before creating the ProcessPoolExecutor.

Note that both Lib/compileall.py and Lib/test/test_compileall.py
were attempting to sanity-check ProcessPoolExecutor by expecting
ImportError. In multiprocessing.resource_tracker, sem_unlink() is also absent
on platforms where POSIX semaphores aren't available. Avoid using
sem_unlink() if it, too, does not exist.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-43147: Remove archaic terminology. (GH-24462)
Raymond Hettinger [Mon, 8 Feb 2021 00:44:42 +0000 (16:44 -0800)] 
bpo-43147:  Remove archaic terminology. (GH-24462)

4 years agobpo-43149: Improve error message for exception group without parentheses (GH-24467)
Pablo Galindo [Sun, 7 Feb 2021 18:42:21 +0000 (18:42 +0000)] 
bpo-43149: Improve error message for exception group without parentheses (GH-24467)

4 years agobpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)
Terry Jan Reedy [Sun, 7 Feb 2021 05:28:50 +0000 (00:28 -0500)] 
bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)

These 3 statements cannot be used at module scope -- nor in exec with one namespace.

4 years agoSimple typo fix (GH-24448)
Andrew Tennikoff [Fri, 5 Feb 2021 18:17:01 +0000 (05:17 +1100)] 
Simple typo fix (GH-24448)

4 years agoFix a typo in a deprecation warning (GH-24423)
Zackery Spytz [Fri, 5 Feb 2021 13:09:17 +0000 (06:09 -0700)] 
Fix a typo in a deprecation warning (GH-24423)

4 years agobpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH...
Zackery Spytz [Fri, 5 Feb 2021 08:25:30 +0000 (01:25 -0700)] 
bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450)

PyObject_RichCompareBool() returns -1 on error, but this case is
not handled by the find_in_strong_cache() function.  Any exception
raised by PyObject_RichCompareBool() should be propagated.

4 years agoMinor readability improvements. Also note performance impact of __slots__. (GH-24456)
Raymond Hettinger [Fri, 5 Feb 2021 06:05:42 +0000 (22:05 -0800)] 
Minor readability improvements.  Also note performance impact of __slots__. (GH-24456)

4 years agoReduce overhead on random timings (GH-24455)
Raymond Hettinger [Fri, 5 Feb 2021 05:36:03 +0000 (21:36 -0800)] 
Reduce overhead on random timings (GH-24455)

4 years agobpo-35295: Remove outdated comment. (GH-24453)
Inada Naoki [Fri, 5 Feb 2021 04:21:28 +0000 (13:21 +0900)] 
bpo-35295: Remove outdated comment. (GH-24453)

4 years agobpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439)
Raymond Hettinger [Thu, 4 Feb 2021 23:52:16 +0000 (15:52 -0800)] 
bpo-43102:  Set namedtuple __new__'s internal builtins to a dict. (GH-24439)

4 years agobpo-42882: Fix MSVC warnings in pystate.c (GH-24440)
Ken Jin [Thu, 4 Feb 2021 22:08:03 +0000 (06:08 +0800)] 
bpo-42882: Fix MSVC warnings in pystate.c (GH-24440)

_PyRuntimeState.unicode_ids.next_index type is Py_ssize_t.

4 years agoFix signed/unsigned comparison to avoid compilation warning (GH-24441)
Ken Jin [Thu, 4 Feb 2021 21:38:18 +0000 (05:38 +0800)] 
Fix signed/unsigned comparison to avoid compilation warning (GH-24441)

4 years agobuild(deps): bump actions/cache from v2.1.3 to v2.1.4 (#24446)
dependabot[bot] [Thu, 4 Feb 2021 20:57:10 +0000 (12:57 -0800)] 
build(deps): bump actions/cache from v2.1.3 to v2.1.4 (#24446)

Bumps [actions/cache](https://github.com/actions/cache) from v2.1.3 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.3...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoFix dependabot.yml file (GH-24443)
Mariatta Wijaya [Thu, 4 Feb 2021 19:22:34 +0000 (11:22 -0800)] 
Fix dependabot.yml file (GH-24443)

The `target-branch` field doesn't seem to support array.
Since it defaults to the default branch anyway, we should just remove the `target-branch` field from the config.

4 years agobpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428)
Dong-hee Na [Wed, 3 Feb 2021 23:32:55 +0000 (08:32 +0900)] 
bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428)

4 years agobpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436)
Pablo Galindo [Wed, 3 Feb 2021 23:29:26 +0000 (23:29 +0000)] 
bpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436)

4 years agoFix typo (GH-23019)
Harry [Wed, 3 Feb 2021 21:25:28 +0000 (21:25 +0000)] 
Fix typo (GH-23019)

Fixed possible typo in comment

4 years agobuild(deps): bump actions/upload-artifact from v2.2.1 to v2.2.2 (GH-24411)
dependabot[bot] [Wed, 3 Feb 2021 21:22:27 +0000 (13:22 -0800)] 
build(deps): bump actions/upload-artifact from v2.2.1 to v2.2.2 (GH-24411)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.1...e448a9b857ee2131e752b06002bf0e093c65e571)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoPost 3.10.0a5
Pablo Galindo [Wed, 3 Feb 2021 06:15:44 +0000 (06:15 +0000)] 
Post 3.10.0a5

4 years agoMerge tag 'v3.10.0a5'
Pablo Galindo [Wed, 3 Feb 2021 06:14:25 +0000 (06:14 +0000)] 
Merge tag 'v3.10.0a5'

Python 3.10.0a5

4 years agobpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394)
diegoe [Wed, 3 Feb 2021 03:28:36 +0000 (22:28 -0500)] 
bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394)

4 years agoAdd link to Microsoft docs for limitations in Windows Store package (GH-24422)
Steve Dower [Wed, 3 Feb 2021 01:13:43 +0000 (01:13 +0000)] 
Add link to Microsoft docs for limitations in Windows Store package (GH-24422)

4 years agobpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)
Ken Jin [Tue, 2 Feb 2021 21:06:57 +0000 (05:06 +0800)] 
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)

Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes

Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
4 years agoFix Sphynx syntax in the memory.rst document v3.10.0a5
Pablo Galindo [Tue, 2 Feb 2021 20:43:11 +0000 (20:43 +0000)] 
Fix Sphynx syntax in the memory.rst document