]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696)
Erlend Egeberg Aasland [Mon, 22 Nov 2021 13:02:27 +0000 (14:02 +0100)] 
bpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-45847: Various PY_STDLIB_MOD cleanups (GH-29697)
Christian Heimes [Mon, 22 Nov 2021 11:09:14 +0000 (13:09 +0200)] 
bpo-45847: Various PY_STDLIB_MOD cleanups (GH-29697)

3 years agobpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_ST...
Erlend Egeberg Aasland [Mon, 22 Nov 2021 09:57:50 +0000 (10:57 +0100)] 
bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE (GH-29690)

Automerge-Triggered-By: GH:tiran
3 years agoFix out-of-tree build support for multissltest (GH-29694)
Christian Heimes [Mon, 22 Nov 2021 09:50:53 +0000 (11:50 +0200)] 
Fix out-of-tree build support for multissltest (GH-29694)

3 years agobpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_...
Erlend Egeberg Aasland [Mon, 22 Nov 2021 08:45:41 +0000 (09:45 +0100)] 
bpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_MOD_SIMPLE (GH-29689)

Automerge-Triggered-By: GH:tiran
3 years agobpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH...
Erlend Egeberg Aasland [Mon, 22 Nov 2021 08:05:36 +0000 (09:05 +0100)] 
bpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH-29688)

3 years agobpo-45723: Add helpers for save/restore env (GH-29637)
Erlend Egeberg Aasland [Mon, 22 Nov 2021 08:05:06 +0000 (09:05 +0100)] 
bpo-45723: Add helpers for save/restore env (GH-29637)

3 years agobpo-45766: Add direct proportion option to linear_regression(). (#29490)
Raymond Hettinger [Sun, 21 Nov 2021 14:39:26 +0000 (08:39 -0600)] 
bpo-45766: Add direct proportion option to linear_regression(). (#29490)

* bpo-45766: Add direct proportion option to linear_regression().

* Update 2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

* Use ellipsis to avoid round-off issues.

* Update Misc/NEWS.d/next/Library/2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Update signature in main docs

* Fix missing comma

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45847: Port codecs and unicodedata to PY_STDLIB_MOD (GH-29685)
Christian Heimes [Sun, 21 Nov 2021 13:08:47 +0000 (15:08 +0200)] 
bpo-45847: Port codecs and unicodedata to PY_STDLIB_MOD (GH-29685)

3 years agobpo-45847: Port grp, spwd, termios, resource, syslog to PY_STDLIB_MOD (GH-29668)
Christian Heimes [Sun, 21 Nov 2021 09:45:31 +0000 (11:45 +0200)] 
bpo-45847: Port grp, spwd, termios, resource, syslog to PY_STDLIB_MOD (GH-29668)

3 years agoEnsure the str member of the tokenizer is always initialised (GH-29681)
Pablo Galindo Salgado [Sun, 21 Nov 2021 02:06:39 +0000 (02:06 +0000)] 
Ensure the str member of the tokenizer is always initialised (GH-29681)

3 years agoReactivate primary mechanism to retrieve frames in the gdb helpers (GH-29682)
Pablo Galindo Salgado [Sun, 21 Nov 2021 02:06:16 +0000 (02:06 +0000)] 
Reactivate primary mechanism to retrieve frames in the gdb helpers (GH-29682)

3 years agoRefactor parser compilation units into specific components (GH-29676)
Pablo Galindo Salgado [Sun, 21 Nov 2021 01:08:50 +0000 (01:08 +0000)] 
Refactor parser compilation units into specific components (GH-29676)

3 years agoAdded kw_only parameter to make_dataclasses. (GH-29679)
Eric V. Smith [Sat, 20 Nov 2021 23:25:56 +0000 (18:25 -0500)] 
Added kw_only parameter to make_dataclasses. (GH-29679)

3 years agobpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373)
Logan Jones [Sat, 20 Nov 2021 20:19:41 +0000 (15:19 -0500)] 
bpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373)

Co-authored-by: Antoine Pitrou <antoine@python.org>
3 years agobpo-45845: Change link for pyserial (GH-29675)
Terry Jan Reedy [Sat, 20 Nov 2021 19:56:42 +0000 (14:56 -0500)] 
bpo-45845: Change link for pyserial (GH-29675)

3 years agobpo-45811: Improve error message when source code contains invisible control characte...
Pablo Galindo Salgado [Sat, 20 Nov 2021 18:28:28 +0000 (18:28 +0000)] 
bpo-45811: Improve error message when source code contains invisible control characters (GH-29654)

3 years agobpo-45450: Improve syntax error for parenthesized arguments (GH-28906)
Pablo Galindo Salgado [Sat, 20 Nov 2021 18:27:40 +0000 (18:27 +0000)] 
bpo-45450: Improve syntax error for parenthesized arguments (GH-28906)

3 years agobpo-44844: Remove unresponsive web link (GH-29651)
Terry Jan Reedy [Sat, 20 Nov 2021 18:21:14 +0000 (13:21 -0500)] 
bpo-44844: Remove unresponsive web link (GH-29651)

Threading notes by Aahz from OSCON 2001.

3 years agobpo-45494: Fix error location in EOF tokenizer errors (GH-29108)
Pablo Galindo Salgado [Sat, 20 Nov 2021 17:40:59 +0000 (17:40 +0000)] 
bpo-45494: Fix error location in EOF tokenizer errors (GH-29108)

3 years agobpo-45852: Fix the Counter/iter test for statistics.mode() (GH-29667)
Raymond Hettinger [Sat, 20 Nov 2021 17:01:09 +0000 (11:01 -0600)] 
bpo-45852:  Fix the Counter/iter test for statistics.mode() (GH-29667)

Suggested by Stefan Pochmann.

3 years ago[doc] Clarify MRO precedence in descriptor super binding section (GH-29539)
Jouke Witteveen [Sat, 20 Nov 2021 16:55:35 +0000 (17:55 +0100)] 
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539)

A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.

3 years agobpo-45851: Avoid full sort in statistics.multimode() (#29662)
Raymond Hettinger [Sat, 20 Nov 2021 16:04:37 +0000 (10:04 -0600)] 
bpo-45851: Avoid full sort in statistics.multimode() (#29662)

Suggested by Stefan Pochmann.

3 years agobpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)
Dylan Van Assche [Sat, 20 Nov 2021 15:52:00 +0000 (16:52 +0100)] 
bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)

Co-authored-by: Éric Araujo <merwok@netwok.org>
3 years agobpo-45847: Port test modules to PY_STDLIB_MOD (GH-29660)
Christian Heimes [Sat, 20 Nov 2021 15:43:10 +0000 (17:43 +0200)] 
bpo-45847: Port test modules to PY_STDLIB_MOD (GH-29660)

3 years agobpo-45848: Allow the parser to get error lines from encoded files (GH-29646)
Pablo Galindo Salgado [Sat, 20 Nov 2021 14:36:07 +0000 (14:36 +0000)] 
bpo-45848: Allow the parser to get error lines from encoded files (GH-29646)

3 years agobpo-45774: Fix SQLite load extension autodetection (GH-29659)
Erlend Egeberg Aasland [Sat, 20 Nov 2021 14:02:52 +0000 (15:02 +0100)] 
bpo-45774: Fix SQLite load extension autodetection (GH-29659)

3 years agobpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641)
JMcB [Sat, 20 Nov 2021 09:35:39 +0000 (09:35 +0000)] 
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641)

3 years agobpo-45847: Port _scproxy to PY_STDLIB_MOD (GH-29644)
Christian Heimes [Sat, 20 Nov 2021 09:18:48 +0000 (11:18 +0200)] 
bpo-45847: Port _scproxy to PY_STDLIB_MOD (GH-29644)

3 years agobpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required...
Brett Cannon [Sat, 20 Nov 2021 00:40:34 +0000 (16:40 -0800)] 
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170)

It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.

3 years agobpo-45506: Fix test_embed expecting to not find stdlib in source tree build when...
Steve Dower [Sat, 20 Nov 2021 00:11:40 +0000 (00:11 +0000)] 
bpo-45506: Fix test_embed expecting to not find stdlib in source tree build when stdlib has been installed. (GH-29649)

3 years agobpo-45727: Make the syntax error for missing comma more consistent (GH-29427)
Pablo Galindo Salgado [Fri, 19 Nov 2021 23:11:57 +0000 (23:11 +0000)] 
bpo-45727: Make the syntax error for missing comma more consistent (GH-29427)

3 years agobpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642)
Christian Heimes [Fri, 19 Nov 2021 19:20:32 +0000 (21:20 +0200)] 
bpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642)

3 years agobpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634)
Raymond Hettinger [Fri, 19 Nov 2021 18:43:49 +0000 (12:43 -0600)] 
bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634)

staticmethod() also became callable in Python 3.10.

See: b83861f02.

3 years agobpo-42238: [doc]: Hide false positive in make suspicious. (GH-29636)
Julien Palard [Fri, 19 Nov 2021 18:11:24 +0000 (19:11 +0100)] 
bpo-42238: [doc]: Hide false positive in make suspicious. (GH-29636)

3 years agobpo-45507: EOFErrors should be thrown for truncated gzip members (GH-29029)
Ruben Vorderman [Fri, 19 Nov 2021 18:07:05 +0000 (19:07 +0100)] 
bpo-45507: EOFErrors should be thrown for truncated gzip members (GH-29029)

3 years agobpo-45573: Move mandatory core modules to Modules/Setup.bootstrap (GH-29616)
Christian Heimes [Fri, 19 Nov 2021 15:40:57 +0000 (17:40 +0200)] 
bpo-45573: Move mandatory core modules to Modules/Setup.bootstrap (GH-29616)

3 years agoFix link to exception handling notes (GH-29617)
Irit Katriel [Fri, 19 Nov 2021 15:40:18 +0000 (15:40 +0000)] 
Fix link to exception handling notes (GH-29617)

3 years agobpo-45709: Fix tracing when exception is handled. (GH-29638)
Mark Shannon [Fri, 19 Nov 2021 15:16:49 +0000 (15:16 +0000)] 
bpo-45709: Fix tracing when exception is handled. (GH-29638)

3 years agobpo-45774: Autoconfiscate SQLite detection (GH-29507)
Erlend Egeberg Aasland [Fri, 19 Nov 2021 14:10:41 +0000 (15:10 +0100)] 
bpo-45774: Autoconfiscate SQLite detection (GH-29507)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-45609: Specialize STORE_SUBSCR (GH-29242)
Dennis Sweeney [Fri, 19 Nov 2021 10:30:37 +0000 (05:30 -0500)] 
bpo-45609: Specialize STORE_SUBSCR (GH-29242)

* Specialize STORE_SUBSCR for list[int], and dict[object]

* Adds _PyDict_SetItem_Take2 which consumes references to the key and values.

3 years agobpo-45788: Link sys.prefix doc to 'Installation paths' (#29606)
Terry Jan Reedy [Thu, 18 Nov 2021 20:08:24 +0000 (15:08 -0500)] 
bpo-45788: Link sys.prefix doc to 'Installation paths' (#29606)

... To the Installation paths section of the sysconfig doc.

3 years agobpo-45640: [docs] Tokens are now clickable (GH-29260)
Arthur Milchior [Thu, 18 Nov 2021 16:06:38 +0000 (17:06 +0100)] 
bpo-45640: [docs] Tokens are now clickable (GH-29260)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years ago[doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data...
Alex Waygood [Thu, 18 Nov 2021 15:54:25 +0000 (15:54 +0000)] 
[doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the  data model (GH-29389)

The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.

3 years agobpo-45837: Properly deprecate turtle.RawTurtle.settiltangle (GH-29618)
Hugo van Kemenade [Thu, 18 Nov 2021 15:02:48 +0000 (17:02 +0200)] 
bpo-45837: Properly deprecate turtle.RawTurtle.settiltangle (GH-29618)

3 years agobpo-45573: Add Modules/Setup.stdlib with conditional modules (GH-29615)
Christian Heimes [Thu, 18 Nov 2021 13:40:01 +0000 (15:40 +0200)] 
bpo-45573: Add Modules/Setup.stdlib with conditional modules (GH-29615)

3 years agobpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. (GH-29592)
Mark Shannon [Thu, 18 Nov 2021 11:02:14 +0000 (11:02 +0000)] 
bpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. (GH-29592)

3 years agobpo-45573: check for ossaudiodev in configure (GH-29614)
Christian Heimes [Thu, 18 Nov 2021 09:56:26 +0000 (11:56 +0200)] 
bpo-45573: check for ossaudiodev in configure (GH-29614)

3 years agobpo-45510: Specialize BINARY_SUBTRACT (GH-29523)
Dong-hee Na [Thu, 18 Nov 2021 09:19:58 +0000 (18:19 +0900)] 
bpo-45510: Specialize BINARY_SUBTRACT (GH-29523)

3 years agobpo-45512: Use Argument Clinic to set sqlite3 isolation level (GH-29593)
Erlend Egeberg Aasland [Thu, 18 Nov 2021 09:18:09 +0000 (10:18 +0100)] 
bpo-45512: Use Argument Clinic to set sqlite3 isolation level (GH-29593)

3 years agobpo-45835: Fix race condition in test_queue (#29601)
Sam Gross [Thu, 18 Nov 2021 08:51:30 +0000 (03:51 -0500)] 
bpo-45835: Fix race condition in test_queue (#29601)

Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).

This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.

3 years agobpo-45573: Introduce extension module flags in Makefile (GH-29594)
Christian Heimes [Thu, 18 Nov 2021 08:18:44 +0000 (10:18 +0200)] 
bpo-45573: Introduce extension module flags in Makefile (GH-29594)

``configure`` now uses a standardized format to forward state, compiler
flags, and linker flags to ``Makefile``, ``setup.py``, and
``Modules/Setup``. ``makesetup`` use the new variables by default if a
module line does not contain any compiler or linker flags. ``setup.py``
has a new function ``addext()``.

For a module ``egg``, configure adds:

* ``MODULE_EGG`` with value yes, missing, disabled, or n/a
* ``MODULE_EGG_CFLAGS``
* ``MODULE_EGG_LDFLAGS``

``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists
dependencies such as header files and static libs.

Signed-off-by: Christian Heimes <christian@python.org>
3 years agobpo-45429: Merge whatsnew about time.sleep (GH-29589)
Dong-hee Na [Thu, 18 Nov 2021 00:26:59 +0000 (09:26 +0900)] 
bpo-45429: Merge whatsnew about time.sleep (GH-29589)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years ago[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571)
ch33zer [Wed, 17 Nov 2021 23:25:53 +0000 (15:25 -0800)] 
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571)

3 years agobpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590)
Dennis Sweeney [Wed, 17 Nov 2021 23:03:52 +0000 (18:03 -0500)] 
bpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590)

3 years agobpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)
Sam Gross [Wed, 17 Nov 2021 20:51:03 +0000 (15:51 -0500)] 
bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)

Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.

3 years agobpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596)
Victor Stinner [Wed, 17 Nov 2021 20:12:20 +0000 (21:12 +0100)] 
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.

3 years agobpo-45512: Simplify manage isolation level (GH-29562)
Dong-hee Na [Wed, 17 Nov 2021 12:47:02 +0000 (21:47 +0900)] 
bpo-45512: Simplify manage isolation level (GH-29562)

3 years agobpo-45512: Extend `sqlite3` test suite regarding isolation levels (GH-29576)
Erlend Egeberg Aasland [Wed, 17 Nov 2021 10:01:54 +0000 (11:01 +0100)] 
bpo-45512: Extend `sqlite3` test suite regarding isolation levels (GH-29576)

3 years agobpo-28806: Continue work: improve the netrc library (GH-26330)
Emmanuel Arias [Wed, 17 Nov 2021 09:07:54 +0000 (06:07 -0300)] 
bpo-28806: Continue work: improve the netrc library (GH-26330)

Continue with the improvement of the library netrc

Original work and report Xiang Zhang <angwerzx@126.com>

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agobpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provi...
Pablo Galindo Salgado [Tue, 16 Nov 2021 20:30:47 +0000 (20:30 +0000)] 
bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582)

3 years agobpo-37800: Clean up importlib documentation for some module attributes (GH-10016)
Géry Ogam [Tue, 16 Nov 2021 19:59:45 +0000 (20:59 +0100)] 
bpo-37800: Clean up importlib documentation for some module attributes (GH-10016)

Automerge-Triggered-By: GH:brettcannon
3 years agobpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580)
Pablo Galindo Salgado [Tue, 16 Nov 2021 19:51:52 +0000 (19:51 +0000)] 
bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580)

3 years agobpo-45126: Harden `sqlite3` connection initialisation (GH-28227)
Erlend Egeberg Aasland [Tue, 16 Nov 2021 14:53:35 +0000 (15:53 +0100)] 
bpo-45126: Harden `sqlite3` connection initialisation (GH-28227)

3 years agobpo-45636: Simplify BINARY_OP (GH-29565)
Brandt Bucher [Tue, 16 Nov 2021 13:53:57 +0000 (05:53 -0800)] 
bpo-45636: Simplify BINARY_OP (GH-29565)

3 years agobpo-45429: Support CREATE_WAITABLE_TIMER_HIGH_RESOLUTION if possible (GH-29203)
Dong-hee Na [Tue, 16 Nov 2021 13:41:20 +0000 (22:41 +0900)] 
bpo-45429: Support CREATE_WAITABLE_TIMER_HIGH_RESOLUTION if possible (GH-29203)

3 years agobpo-45292: Use raw strings for regex in tests (GH-29545)
Irit Katriel [Tue, 16 Nov 2021 11:58:21 +0000 (11:58 +0000)] 
bpo-45292: Use raw strings for regex in tests (GH-29545)

3 years agobpo-45753: Make recursion checks more efficient. (GH-29524)
Mark Shannon [Tue, 16 Nov 2021 11:01:57 +0000 (11:01 +0000)] 
bpo-45753: Make recursion checks more efficient. (GH-29524)

* Uses recursion remaining, instead of recursion depth to speed up check against recursion limit.

3 years agobpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)
Victor Stinner [Mon, 15 Nov 2021 23:29:17 +0000 (00:29 +0100)] 
bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)

Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.

Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.

* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
  _smtpd modules
* _smtpd: remove deprecated properties

3 years agobpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522)
Emmanuel Arias [Mon, 15 Nov 2021 22:44:32 +0000 (19:44 -0300)] 
bpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522)

* Add missing value returned by methods on cookiejar

Documentation say that return something but don't specific with what
value is return, and that can be confuse. This patch add that information.

* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* Update Doc/library/http.cookiejar.rst

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
3 years agobpo-25381: Update explanation of exceptions in C. (GH-26838)
Terry Jan Reedy [Mon, 15 Nov 2021 22:38:53 +0000 (17:38 -0500)] 
bpo-25381: Update explanation of exceptions in C. (GH-26838)

* bpo-25381: Update explanation of exception globals

This paragraph in extending/extending.rst was unchanged (except for
NULL markup) since committed in 2007 Aug 15 for 2.6 alpha.

* Respond to reviews and remove duplication.

* Update Doc/extending/extending.rst

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agoSave a reference for ensure_future and create_task (GH-29163)
Joannah Nanjekye [Mon, 15 Nov 2021 22:30:28 +0000 (18:30 -0400)] 
Save a reference for ensure_future and create_task (GH-29163)

Co-authored-by: Joannah Nanjekye <jnanjekye@python.org>
3 years agobpo-45677: Reword first section of `sqlite3` docs (#29326)
Erlend Egeberg Aasland [Mon, 15 Nov 2021 22:22:42 +0000 (23:22 +0100)] 
bpo-45677: Reword first section of `sqlite3` docs (#29326)

* bpo-45677: Avoid addressing the reader as 'you' in sqlite3 docs

* Adjust wording

* Adjust wording again

* Typo

* Update Doc/library/sqlite3.rst

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* Address review: adjust wording

* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Lib/sqlite3/__init__.py

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Doc/library/sqlite3.rst

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Apply Alex' suggestion, and apply 80 char limit to PR

* Minor adjustment

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agobpo-45636: Remove the old %-formatting fast-path (GH-29532)
Brandt Bucher [Mon, 15 Nov 2021 16:58:23 +0000 (08:58 -0800)] 
bpo-45636: Remove the old %-formatting fast-path (GH-29532)

3 years agobpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolatio...
Erlend Egeberg Aasland [Mon, 15 Nov 2021 12:55:38 +0000 (13:55 +0100)] 
bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolation level (#29561)

* bpo-45512: Raise sqlite3.Connection.__init__ is called with bad isolation level

* Also explicitly test allowed isolation levels

* Use subTest for better error messages if something goes wrong

* Update Lib/test/test_sqlite3/test_dbapi.py

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
3 years agobpo-45512: Simplify isolation_level handling in `sqlite3` (GH-29053)
Erlend Egeberg Aasland [Mon, 15 Nov 2021 07:50:59 +0000 (08:50 +0100)] 
bpo-45512: Simplify isolation_level handling in `sqlite3` (GH-29053)

3 years agobpo-45573: Use Makefile's dependencies in setup.py (GH-29559)
Christian Heimes [Sun, 14 Nov 2021 19:55:15 +0000 (21:55 +0200)] 
bpo-45573: Use Makefile's dependencies in setup.py (GH-29559)

3 years agobpo-45752: Remove "array" from list of things that cannot be copied in `copy` module...
Alex Waygood [Sun, 14 Nov 2021 12:56:01 +0000 (12:56 +0000)] 
bpo-45752: Remove "array" from list of things that cannot be copied in `copy` module docstring (GH-29555)

Automerge-Triggered-By: GH:asvetlov
3 years agobpo-45752: Fix no-support examples in 'copy' docs (GH-29548)
M. Mostafa Farzan [Sun, 14 Nov 2021 09:34:37 +0000 (13:04 +0330)] 
bpo-45752: Fix no-support examples in 'copy' docs (GH-29548)

3 years agobpo-45800: Move pyexpat build setup into configure (GH-29547)
Christian Heimes [Sun, 14 Nov 2021 09:02:24 +0000 (11:02 +0200)] 
bpo-45800: Move pyexpat build setup into configure (GH-29547)

Settings for :mod:`pyexpat` C extension are now detected by ``configure``.
The bundled ``expat`` library is built in ``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
3 years agobpo-45738: Fix computation of error location for invalid continuation (GH-29550)
Pablo Galindo Salgado [Sun, 14 Nov 2021 01:06:41 +0000 (01:06 +0000)] 
bpo-45738: Fix computation of error location for invalid continuation (GH-29550)

characters in the parser

3 years agobpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
Jack DeVries [Sat, 13 Nov 2021 20:16:05 +0000 (15:16 -0500)] 
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)

I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence.

Automerge-Triggered-By: GH:ericvsmith
3 years agobpo-45798: Move _decimal build setup into configure (GH-29541)
Christian Heimes [Sat, 13 Nov 2021 12:56:16 +0000 (14:56 +0200)] 
bpo-45798: Move _decimal build setup into configure (GH-29541)

Settings for :mod:`decimal` internal C extension are now detected by
:program:`configure`. The bundled `libmpdec` library is built in
``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
3 years agobpo-45772: socket.socket should be a class instead of a function (GH-23960)
Hong Xu [Sat, 13 Nov 2021 06:02:04 +0000 (22:02 -0800)] 
bpo-45772: socket.socket should be a class instead of a function (GH-23960)

* bpo-45772: socket.socket should be a class instead of a function

Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.

3 years agobpo-45711: assert that the type of exc_info is redundant (GH-29518)
Irit Katriel [Fri, 12 Nov 2021 21:37:26 +0000 (21:37 +0000)] 
bpo-45711: assert that the type of exc_info is redundant (GH-29518)

3 years agobpo-45745: Remove regrtest --findleaks options (GH-29514)
Victor Stinner [Fri, 12 Nov 2021 15:19:09 +0000 (16:19 +0100)] 
bpo-45745: Remove regrtest --findleaks options (GH-29514)

Remove the --findleaks command line option of regrtest: use the
--fail-env-changed option instead. Since Python 3.7, it was a
deprecated alias to the --fail-env-changed option.

3 years agobpo-45711: Re-bump the magic number and update doc (GH-29528)
Brandt Bucher [Fri, 12 Nov 2021 13:21:45 +0000 (05:21 -0800)] 
bpo-45711: Re-bump the magic number and update doc (GH-29528)

3 years agobpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533)
Hynek Schlawack [Fri, 12 Nov 2021 09:47:55 +0000 (10:47 +0100)] 
bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533)

Since `.. module:: contextvars` sets the module using `.. class:: contextvars.Token`, intersphinx records it as `contextvars.contextvars.Token`.

3 years agobpo-45235: Revert an argparse bugfix that caused a regression (GH-29525)
Raymond Hettinger [Fri, 12 Nov 2021 03:53:23 +0000 (21:53 -0600)] 
bpo-45235:  Revert an argparse bugfix that caused a regression (GH-29525)

* Revert "bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) (GH-28443)"

This reverts commit a18d52269ab6071a605d6c72f6af585a4c533ca4.

3 years agobpo-45773: Stop "optimizing" certain jump patterns (GH-29505)
Brandt Bucher [Thu, 11 Nov 2021 19:44:34 +0000 (11:44 -0800)] 
bpo-45773: Stop "optimizing" certain jump patterns (GH-29505)

3 years agobpo-45636: Merge all numeric operators (GH-29482)
Brandt Bucher [Thu, 11 Nov 2021 06:56:22 +0000 (22:56 -0800)] 
bpo-45636: Merge all numeric operators (GH-29482)

3 years agobpo-45696: Deep-freeze selected modules (GH-29118)
Guido van Rossum [Thu, 11 Nov 2021 02:01:53 +0000 (18:01 -0800)] 
bpo-45696: Deep-freeze selected modules (GH-29118)

This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems.

The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new.

Windows version TBD.

3 years agobpo-45723: Add --with-pkg-config to configure (GH-29517)
Christian Heimes [Wed, 10 Nov 2021 22:02:19 +0000 (00:02 +0200)] 
bpo-45723: Add --with-pkg-config to configure (GH-29517)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)
Christian Heimes [Wed, 10 Nov 2021 19:26:55 +0000 (21:26 +0200)] 
bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45754: Use correct SQLite limit when checking statement length (GH-29489)
Erlend Egeberg Aasland [Wed, 10 Nov 2021 18:46:11 +0000 (19:46 +0100)] 
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)

3 years agobpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495)
Irit Katriel [Wed, 10 Nov 2021 18:08:28 +0000 (18:08 +0000)] 
bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495)

4 years agobpo-45711: Use _PyErr_ClearExcState instead of setting only exc_value to NULL (GH...
Irit Katriel [Wed, 10 Nov 2021 16:57:14 +0000 (16:57 +0000)] 
bpo-45711: Use _PyErr_ClearExcState instead of setting only exc_value to NULL (GH-29404)

4 years agobpo-45723: Improve and simplify more configure.ac checks (GH-29485)
Erlend Egeberg Aasland [Wed, 10 Nov 2021 15:30:18 +0000 (16:30 +0100)] 
bpo-45723: Improve and simplify more configure.ac checks (GH-29485)

4 years agobpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515)
Pablo Galindo Salgado [Wed, 10 Nov 2021 13:41:22 +0000 (13:41 +0000)] 
bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515)

4 years ago[bpo-45765] Fix distribution discovery on empty path. (#29487)
Jason R. Coombs [Tue, 9 Nov 2021 23:49:43 +0000 (18:49 -0500)] 
[bpo-45765] Fix distribution discovery on empty path. (#29487)