]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380)
Vinay Sajip [Mon, 29 Aug 2022 21:29:22 +0000 (22:29 +0100)] 
gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380)

3 years agoGH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)
Kumar Aditya [Mon, 29 Aug 2022 18:31:11 +0000 (00:01 +0530)] 
GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)

3 years agoImprove accuracy for Spearman's rank correlation coefficient. (#96392)
Raymond Hettinger [Mon, 29 Aug 2022 17:19:48 +0000 (12:19 -0500)] 
Improve accuracy for Spearman's rank correlation coefficient. (#96392)

3 years agogh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)
Christian Heimes [Mon, 29 Aug 2022 16:19:15 +0000 (18:19 +0200)] 
gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)

3 years agoast.parse: check `feature_version` common case first (GH-94640)
Anthony Sottile [Mon, 29 Aug 2022 14:05:24 +0000 (10:05 -0400)] 
ast.parse: check `feature_version` common case first (GH-94640)

3 years agoFix Py_INCREF() statistics in limited C API 3.10 (#96120)
Victor Stinner [Mon, 29 Aug 2022 12:55:46 +0000 (14:55 +0200)] 
Fix Py_INCREF() statistics in limited C API 3.10 (#96120)

In the limited C API with a debug build, Py_INCREF() is implemented
by calling _Py_IncRef() which calls Py_INCREF(). Only call
_Py_INCREF_STAT_INC() once.

3 years agogh-90814: Correct NEWS wording re. optional C11 features (GH-96309)
Petr Viktorin [Mon, 29 Aug 2022 11:10:52 +0000 (13:10 +0200)] 
gh-90814: Correct NEWS wording re. optional C11 features (GH-96309)

The previous wording of this entry suggests that CPython
won't work if optional compiler features are enabled.
That's not the case. The change is that we require C11 rather
than C89.

Note that PEP 7 does say "Python 3.11 and newer versions use C11
without optional features." It is correct there: that's
not a guide for users who compile Python, but for CPython devs
who must avoid the features.

3 years agogh-95432: Add doctests for the sqlite3 docs (#96225)
Erlend E. Aasland [Mon, 29 Aug 2022 08:52:39 +0000 (10:52 +0200)] 
gh-95432: Add doctests for the sqlite3 docs (#96225)

As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces

3 years agogh-96191: Update the configure file to use GitHub issue (gh-96211)
Dong-hee Na [Mon, 29 Aug 2022 05:01:37 +0000 (14:01 +0900)] 
gh-96191: Update the configure file to use GitHub issue (gh-96211)

3 years agoPrepare private _rank() function to be made public. (#96372)
Raymond Hettinger [Mon, 29 Aug 2022 04:41:58 +0000 (23:41 -0500)] 
Prepare private _rank() function to be made public. (#96372)

3 years agogh-96357: Improve `typing.get_overloads` coverage (#96358)
Nikita Sobolev [Mon, 29 Aug 2022 00:45:24 +0000 (03:45 +0300)] 
gh-96357: Improve `typing.get_overloads` coverage (#96358)

3 years agogh-95950: Add a test for both `csv.Dialect` and `kwargs` (#95951)
Nikita Sobolev [Mon, 29 Aug 2022 00:43:32 +0000 (03:43 +0300)] 
gh-95950: Add a test for both `csv.Dialect` and `kwargs` (#95951)

3 years agoGH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)
Jonathan Oberländer [Sun, 28 Aug 2022 22:48:51 +0000 (00:48 +0200)] 
GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)

3 years agogh-69142: add %:z strftime format code (gh-95983)
TW [Sun, 28 Aug 2022 21:27:42 +0000 (23:27 +0200)] 
gh-69142: add %:z strftime format code (gh-95983)

datetime.isoformat generates the tzoffset with colons, but there
was no format code to make strftime output the same format.

for simplicity and consistency the %:z formatting behaves mostly
as %z, with the exception of adding colons. this includes the
dynamic behaviour of adding seconds and microseconds only when
needed (when not 0).

this fixes the still open "generate" part of this issue:

https://github.com/python/cpython/issues/69142

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-90467: StreamReaderProtocol - add strong reference to created task (#96323)
Kirill [Sat, 27 Aug 2022 19:32:01 +0000 (22:32 +0300)] 
gh-90467: StreamReaderProtocol - add strong reference to created task (#96323)

3 years agogh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)
Vinay Sajip [Sat, 27 Aug 2022 12:33:24 +0000 (13:33 +0100)] 
gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)

3 years agogh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322)
Vinay Sajip [Sat, 27 Aug 2022 11:13:19 +0000 (12:13 +0100)] 
gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322)

3 years agofixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (#96327)
Ansab Gillani [Sat, 27 Aug 2022 05:33:29 +0000 (10:33 +0500)] 
fixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (#96327)

3 years agofix threading.Event.isSet() docstring (#96297)
Daniel Giger [Sat, 27 Aug 2022 05:06:26 +0000 (01:06 -0400)] 
fix threading.Event.isSet() docstring (#96297)

fixes gh-96296

3 years agoDocs: Fix count of bullets in asyncio-task.rst (#96307)
zhanpon [Sat, 27 Aug 2022 03:50:48 +0000 (12:50 +0900)] 
Docs: Fix count of bullets in asyncio-task.rst (#96307)

3 years agogh-95973: Add a new --with-dsymutil option to link debug information in macOS (GH...
Pablo Galindo Salgado [Sat, 27 Aug 2022 00:49:41 +0000 (01:49 +0100)] 
gh-95973: Add a new --with-dsymutil option to link debug information in macOS (GH-95974)

Automerge-Triggered-By: GH:pablogsal
3 years agogh-77116: Add SMTP buffering example to logging cookbook. (GH-96324)
Vinay Sajip [Fri, 26 Aug 2022 23:24:36 +0000 (00:24 +0100)] 
gh-77116: Add SMTP buffering example to logging cookbook. (GH-96324)

3 years agogh-96280: suppress deprecation warning in test_importlib (GH-96281)
Irit Katriel [Fri, 26 Aug 2022 21:44:33 +0000 (22:44 +0100)] 
gh-96280: suppress deprecation warning in test_importlib (GH-96281)

3 years agoFix documentation typo for pathlib.Path.walk (GH-96301)
Ansab Gillani [Fri, 26 Aug 2022 21:21:40 +0000 (02:21 +0500)] 
Fix documentation typo for pathlib.Path.walk (GH-96301)

3 years agogh-95994: Clarify escaped newlines. (#96066)
Ezio Melotti [Fri, 26 Aug 2022 19:05:01 +0000 (21:05 +0200)] 
gh-95994: Clarify escaped newlines. (#96066)

* gh-95994: clarify escaped newlines.

* Rephrase ambiguous sentence.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Use `<newline>` in escape sequences table.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agoGH-96172 fix unicodedata.east_asian_width being wrong on unassigned code points ...
Carl Friedrich Bolz-Tereick [Fri, 26 Aug 2022 16:29:39 +0000 (18:29 +0200)] 
GH-96172 fix unicodedata.east_asian_width being wrong on unassigned code points (#96207)

3 years agobpo-33587: inspect.getsource: reorder stat on file in linecache (GH-6805)
Pankaj Pandey [Fri, 26 Aug 2022 14:20:48 +0000 (10:20 -0400)] 
bpo-33587: inspect.getsource: reorder stat on file in linecache (GH-6805)

* inspect.getsource: avoid stat on file in linecache

The check for os.path.exists() on source file is postponed in
inspect.getsourcefile() until needed avoiding an expensive filesystem
stat call and PEP 302 module loader check is moved last for performance
since it is an uncommon case.

3 years agoPort regression test for issue GH-93592 (GH-96208)
Kristján Valur Jónsson [Fri, 26 Aug 2022 14:07:31 +0000 (14:07 +0000)] 
Port regression test for issue GH-93592 (GH-96208)

3 years agogh-96269: Fix build dependency on AIX (GH-96304)
Christian Heimes [Fri, 26 Aug 2022 10:31:58 +0000 (12:31 +0200)] 
gh-96269: Fix build dependency on AIX (GH-96304)

3 years agogh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
Dong-hee Na [Fri, 26 Aug 2022 02:02:57 +0000 (11:02 +0900)] 
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)

3 years agogh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)
Dong-hee Na [Fri, 26 Aug 2022 01:43:02 +0000 (10:43 +0900)] 
gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)

3 years agogh-90110: Update the c-analyzer Tool (gh-96255)
Eric Snow [Thu, 25 Aug 2022 21:46:08 +0000 (15:46 -0600)] 
gh-90110: Update the c-analyzer Tool (gh-96255)

Here we automatically ignore uses of _PyArg_Parser, "kwlist" arrays, and module/type defs. That way new uses don't trigger false positives in the c-analyzer check script.

3 years agogh-96276: suppress SyntaxWarning in test_compile (GH-96277)
Irit Katriel [Thu, 25 Aug 2022 21:23:06 +0000 (22:23 +0100)] 
gh-96276: suppress SyntaxWarning in test_compile (GH-96277)

3 years agobpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build...
conioh [Thu, 25 Aug 2022 19:23:42 +0000 (22:23 +0300)] 
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)

3 years agogh-96272: Replace `test_source_encoding`'s `test_pep263` with `test_import_encoded_mo...
Michael Droettboom [Thu, 25 Aug 2022 19:19:16 +0000 (15:19 -0400)] 
gh-96272: Replace `test_source_encoding`'s `test_pep263` with `test_import_encoded_module` from `test_imp` (GH-96275)

Editors don't agree that `test_source_encoding.py` was valid koi8-r, making it
hard to edit that file without the editor breaking it in some way (see gh-96272).

Only one test actually relied on the koi8-r encoding and it was a duplicate of a
test from the deprecated `imp` module's `test_imp`, so here we replace
`test_pep263` with `test_import_encoded_module` stolen from `test_imp` and
set `test_source_encoding.py`'s encoding to utf-8 to make editing it easier
going forward.

3 years agoClarify API stability of PyTypeObject in relation to static types. (GH-96217)
ov2k [Thu, 25 Aug 2022 13:32:12 +0000 (09:32 -0400)] 
Clarify API stability of PyTypeObject in relation to static types. (GH-96217)

Fixes:
https://github.com/python/cpython/issues/95300

Related:
https://github.com/python/cpython/issues/91271

3 years agogh-92445 Improve interaction between nargs="*" and choices() (GH-92565)
Harry [Thu, 25 Aug 2022 11:18:38 +0000 (12:18 +0100)] 
gh-92445 Improve interaction between nargs="*" and choices() (GH-92565)

3 years agogh-76728: Coerce DictReader and DictWriter fieldnames argument to a list (GH-32225)
Sam Ezeh [Thu, 25 Aug 2022 10:13:24 +0000 (11:13 +0100)] 
gh-76728: Coerce DictReader and DictWriter fieldnames argument to a list (GH-32225)

3 years agoGH-96237: Allow non-functions as reference-holder in frames. (GH-96238)
Mark Shannon [Thu, 25 Aug 2022 09:16:55 +0000 (10:16 +0100)] 
GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)

3 years agogh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803)
Vinay Sajip [Thu, 25 Aug 2022 07:27:30 +0000 (08:27 +0100)] 
gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803)

3 years agogh-95243: Mitigate the race condition in testSockName (#96173)
Ross Burton [Thu, 25 Aug 2022 01:37:18 +0000 (02:37 +0100)] 
gh-95243: Mitigate the race condition in testSockName (#96173)

find_unused_port() has an inherent race condition, but we can't use
bind_port() as that uses .getsockname() which this test is exercising.

Try binding to unused ports a few times before failing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
3 years agoGH-93503: Add thread-specific APIs to set profiling and tracing functions in the...
Pablo Galindo Salgado [Wed, 24 Aug 2022 22:21:39 +0000 (23:21 +0100)] 
GH-93503: Add thread-specific APIs to set profiling and tracing functions in the C-API (#93504)

* gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API

* Use a separate API

* Fix NEWS entry

* Add locks around the loop

* Document ignoring exceptions

* Use the new APIs in the sys module

* Update docs

3 years agoAdd gvanrossum to asyncio experts (#96248)
Guido van Rossum [Wed, 24 Aug 2022 20:16:41 +0000 (13:16 -0700)] 
Add gvanrossum to asyncio experts (#96248)

3 years agogh-87092: use basicblock_last_instr consistently in the compiler (GH-96243)
Irit Katriel [Wed, 24 Aug 2022 15:58:42 +0000 (16:58 +0100)] 
gh-87092: use basicblock_last_instr consistently in the compiler (GH-96243)

3 years agoGH-96179: Fix misleading example on the bisect documentation (GH-96228)
prego [Wed, 24 Aug 2022 15:47:13 +0000 (17:47 +0200)] 
GH-96179: Fix misleading example on the bisect documentation (GH-96228)

The `movies[bisect(movies, 1960, key=by_year)]` will actually return only movies **after** 1960.

3 years agogh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost (gh-96231)
Dong-hee Na [Wed, 24 Aug 2022 14:03:36 +0000 (23:03 +0900)] 
gh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost (gh-96231)

3 years agoGH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. (GH-96204)
Mark Shannon [Wed, 24 Aug 2022 13:21:01 +0000 (14:21 +0100)] 
GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. (GH-96204)

3 years agogh-96021: Explicitly close the IsolatedAsyncioTestCase runner in tests (GH-96135)
Serhiy Storchaka [Wed, 24 Aug 2022 12:07:20 +0000 (15:07 +0300)] 
gh-96021: Explicitly close the IsolatedAsyncioTestCase runner in tests (GH-96135)

Tests for IsolatedAsyncioTestCase.debug() rely on the runner be closed
in __del__. It makes tests depending on the GC an unreliable on other
implementations. It is better to close the runner explicitly even if
currently there is no a public API for this.

3 years agogh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler optimizati...
Irit Katriel [Wed, 24 Aug 2022 10:02:53 +0000 (11:02 +0100)] 
gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler optimization unit tests (GH-96007)

3 years agogh-94635: Frame sqlite3 how-to headings as such & move default adapters to reference...
C.A.M. Gerlach [Wed, 24 Aug 2022 07:14:14 +0000 (02:14 -0500)] 
gh-94635: Frame sqlite3 how-to headings as such & move default adapters to reference (#96136)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agoGH-96145: Add AttrDict to JSON module for use with object_hook (#96146)
Raymond Hettinger [Tue, 23 Aug 2022 21:22:00 +0000 (16:22 -0500)] 
GH-96145: Add AttrDict to JSON module for use with object_hook (#96146)

3 years agogh-96189: Fix test_invalid_utf8 on a number of build bots (GH-96190)
Michael Droettboom [Tue, 23 Aug 2022 20:52:55 +0000 (16:52 -0400)] 
gh-96189: Fix test_invalid_utf8 on a number of build bots (GH-96190)

The clearing of the temporary directory is not working on some platforms and
leaving behind files.

This has been updated to use the pattern in test_cmd_line.py [1] using the
special TESTFN rather than a test directory.

[1] https://github.com/python/cpython/blob/main/Lib/test/test_cmd_line.py#L559

3 years agoDrop myself from owners of genobject (#96216)
Yury Selivanov [Tue, 23 Aug 2022 19:21:10 +0000 (12:21 -0700)] 
Drop myself from owners of genobject (#96216)

3 years agogh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (#96176)
Kevin Kirsche [Tue, 23 Aug 2022 16:16:02 +0000 (12:16 -0400)] 
gh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (#96176)

X-Ref: https://github.com/python/typeshed/pull/8590#discussion_r951473977

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoGH-96068: Document object layout (GH-96069)
Mark Shannon [Tue, 23 Aug 2022 12:55:43 +0000 (13:55 +0100)] 
GH-96068: Document object layout (GH-96069)

3 years agoGH-96187: Prevent _PyCode_GetExtra to return garbage for negative indexes (GH-96188)
Pablo Galindo Salgado [Tue, 23 Aug 2022 10:13:53 +0000 (11:13 +0100)] 
GH-96187: Prevent _PyCode_GetExtra to return garbage for negative indexes (GH-96188)

3 years agogh-96197: Add `del sys.breakpointhook` behavior test (gh-96198)
Jeong YunWon [Tue, 23 Aug 2022 08:58:38 +0000 (17:58 +0900)] 
gh-96197: Add `del sys.breakpointhook` behavior test (gh-96198)

3 years agogh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (#96134)
C.A.M. Gerlach [Tue, 23 Aug 2022 06:51:20 +0000 (01:51 -0500)] 
gh-96096: Add undocumented SQLITE_OK/DENY/IGNORE sqlite3 constants (#96134)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-95432: Add doctest for sqlite3 tutorial (#96193)
Erlend E. Aasland [Tue, 23 Aug 2022 06:48:13 +0000 (08:48 +0200)] 
gh-95432: Add doctest for sqlite3 tutorial (#96193)

3 years agogh-96159: Fix significant performance degradation in logging.TimedRotat… (GH-96182)
Duncan Grisby [Tue, 23 Aug 2022 06:28:43 +0000 (07:28 +0100)] 
gh-96159: Fix significant performance degradation in logging.TimedRotat… (GH-96182)

3 years agoGH-96075: move interned dict under runtime state (GH-96077)
Kumar Aditya [Mon, 22 Aug 2022 19:05:21 +0000 (00:35 +0530)] 
GH-96075: move interned dict under runtime state (GH-96077)

3 years agoGH-96071: add regression test for #96071 (GH-96137)
Kumar Aditya [Mon, 22 Aug 2022 18:40:23 +0000 (00:10 +0530)] 
GH-96071: add regression test for #96071 (GH-96137)

Automerge-Triggered-By: GH:ericsnowcurrently
3 years agogh-96076: Change test_launcher to use non-admin location for py.ini (GH-96091)
Terry Jan Reedy [Mon, 22 Aug 2022 16:23:27 +0000 (12:23 -0400)] 
gh-96076: Change test_launcher to use non-admin location for py.ini (GH-96091)

Patch authored by Eryksun.

3 years agogh-96121: Merge sqlite3.Row examples into sqlite3.Row class doc (#96122)
Erlend E. Aasland [Mon, 22 Aug 2022 08:03:24 +0000 (10:03 +0200)] 
gh-96121: Merge sqlite3.Row examples into sqlite3.Row class doc (#96122)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-96046: Initialize ht_cached_keys in PyType_Ready() (GH-96047)
Christian Heimes [Mon, 22 Aug 2022 05:24:03 +0000 (07:24 +0200)] 
gh-96046: Initialize ht_cached_keys in PyType_Ready() (GH-96047)

3 years agosmall grammatical change (GH-96138)
sand8089 [Sun, 21 Aug 2022 14:56:52 +0000 (07:56 -0700)] 
small grammatical change (GH-96138)

changed a to an under An example that uses most of the list methods

3 years agoGH-95880: Clarify StringIO append/overwrite behavior. (GH-96104)
Raymond Hettinger [Sun, 21 Aug 2022 14:42:15 +0000 (09:42 -0500)] 
GH-95880:  Clarify StringIO append/overwrite behavior. (GH-96104)

3 years agoAdd polynomial_from_roots() to the itertools recipes (#96102)
Raymond Hettinger [Sun, 21 Aug 2022 14:41:29 +0000 (09:41 -0500)] 
Add polynomial_from_roots() to the itertools recipes (#96102)

3 years agoGH-93179: Document the thread safety of functools.lru_cache (GH-96101)
Raymond Hettinger [Sun, 21 Aug 2022 14:40:13 +0000 (09:40 -0500)] 
GH-93179: Document the thread safety of functools.lru_cache (GH-96101)

3 years agogh-96098: Clearly link concurrent.futures from threading & multiprocessing docs ...
Nick Coghlan [Sun, 21 Aug 2022 02:09:05 +0000 (14:09 +1200)] 
gh-96098: Clearly link concurrent.futures from threading & multiprocessing docs (GH-96112)

Clearly link concurrent.futures from threading & multiprocessing docs

Also link directly to asyncio from the beginning of the threading docs.

3 years agogh-90536: Fix link syntax to LLVM-BOLT repository (gh-96141)
Dong-hee Na [Sat, 20 Aug 2022 15:11:35 +0000 (00:11 +0900)] 
gh-90536: Fix link syntax to LLVM-BOLT repository (gh-96141)

3 years agoGH-96071: fix deadlock in PyGILState_Ensure (GH-96124)
Kumar Aditya [Fri, 19 Aug 2022 19:43:00 +0000 (01:13 +0530)] 
GH-96071: fix deadlock in PyGILState_Ensure  (GH-96124)

Alternative of #96107

3 years agogh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126)
Christian Heimes [Fri, 19 Aug 2022 19:41:25 +0000 (21:41 +0200)] 
gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126)

Automerge-Triggered-By: GH:tiran
3 years agoGH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010)
Brandt Bucher [Fri, 19 Aug 2022 19:33:44 +0000 (12:33 -0700)] 
GH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010)

3 years agogh-96019: Fix caching of decompositions in makeunicodedata (GH-96020)
Carl Friedrich Bolz-Tereick [Fri, 19 Aug 2022 09:20:44 +0000 (11:20 +0200)] 
gh-96019: Fix caching of decompositions in makeunicodedata (GH-96020)

3 years agoDocs: Fix markup of module name in sqlite3 docs (#96115)
Erlend E. Aasland [Fri, 19 Aug 2022 08:18:08 +0000 (10:18 +0200)] 
Docs: Fix markup of module name in sqlite3 docs (#96115)

3 years agoDoc: Use consistent markup for example Point class in sqlite3 (#96095)
C.A.M. Gerlach [Fri, 19 Aug 2022 07:41:16 +0000 (02:41 -0500)] 
Doc: Use consistent markup for example Point class in sqlite3 (#96095)

3 years agoDocs: group sqlite3.Connection attributes and methods (#96090)
Erlend E. Aasland [Fri, 19 Aug 2022 07:30:41 +0000 (09:30 +0200)] 
Docs: group sqlite3.Connection attributes and methods (#96090)

3 years agogh-94635: Remove sqlite3 doc introduction heading (#96089)
Erlend E. Aasland [Fri, 19 Aug 2022 07:21:11 +0000 (09:21 +0200)] 
gh-94635: Remove sqlite3 doc introduction heading (#96089)

3 years agogh-95853: WASM: better version and asset handling in scripts (GH-96045)
Christian Heimes [Fri, 19 Aug 2022 06:36:12 +0000 (08:36 +0200)] 
gh-95853: WASM: better version and asset handling in scripts (GH-96045)

- support EMSDK tot-upstream and git releases
- allow WASM assents for wasm64-emscripten and WASI. This makes single file distributions on WASI easier.
- decouple WASM assets from browser builds

3 years agogh-96039: Corrected wording error in itertools doc (GH-96105)
MrSuspicious [Fri, 19 Aug 2022 06:20:45 +0000 (07:20 +0100)] 
gh-96039: Corrected wording error in itertools doc (GH-96105)

3 years agogh-96017: Fix some compiler warnings (GH-96018)
Christian Heimes [Fri, 19 Aug 2022 06:08:43 +0000 (08:08 +0200)] 
gh-96017: Fix some compiler warnings (GH-96018)

- "comparison of integers of different signs" in typeobject.c
- only define static_builtin_index_is_set in DEBUG builds
- only define recreate_gil with ifdef HAVE_FORK

3 years agoGH-95822: Need _PyType_Lookup() in descriptor howto code equivalent. (GH-95967)
Raymond Hettinger [Fri, 19 Aug 2022 04:56:58 +0000 (23:56 -0500)] 
GH-95822:  Need _PyType_Lookup() in descriptor howto code equivalent. (GH-95967)

3 years agogh-95914: Add Py_UNICODE encode APIs removed in PEP 624 to 3.11 What's New (#96016)
C.A.M. Gerlach [Thu, 18 Aug 2022 23:52:59 +0000 (18:52 -0500)] 
gh-95914: Add Py_UNICODE encode APIs removed in PEP 624 to 3.11 What's New (#96016)

* 3.11 Whatsnew: Add Py_UNICODE encode functions removed in PEP 624

* Just use :func: instead of :c:func: for non-resolved funcs so ! works

3 years agogh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags...
Pablo Galindo Salgado [Thu, 18 Aug 2022 23:45:55 +0000 (00:45 +0100)] 
gh-95463: Remove backwards incompatible change regarding the _MASK_UTF_FILENAME flags in bpo-28080 (GH-96072)

Automerge-Triggered-By: GH:pablogsal
3 years agoGH-93179: Document the thread safety of functools.lru_cache (GH-95970)
Raymond Hettinger [Thu, 18 Aug 2022 22:38:49 +0000 (17:38 -0500)] 
GH-93179: Document the thread safety of functools.lru_cache (GH-95970)

3 years agogh-90536: Add support for the BOLT post-link binary optimizer (gh-95908)
Kevin Modzelewski [Thu, 18 Aug 2022 21:33:54 +0000 (17:33 -0400)] 
gh-90536: Add support for the BOLT post-link binary optimizer (gh-95908)

* Add support for the BOLT post-link binary optimizer

Using [bolt](https://github.com/llvm/llvm-project/tree/main/bolt)
provides a fairly large speedup without any code or functionality
changes. It provides roughly a 1% speedup on pyperformance, and a
4% improvement on the Pyston web macrobenchmarks.

It is gated behind an `--enable-bolt` configure arg because not all
toolchains and environments are supported. It has been tested on a
Linux x86_64 toolchain, using llvm-bolt built from the LLVM 14.0.6
sources (their binary distribution of this version did not include bolt).

Compared to [a previous attempt](https://github.com/faster-cpython/ideas/issues/224),
this commit uses bolt's preferred "instrumentation" approach, as well as adds some non-PIE
flags which enable much better optimizations from bolt.

The effects of this change are a bit more dependent on CPU microarchitecture
than other changes, since it optimizes i-cache behavior which seems
to be a bit more variable between architectures. The 1%/4% numbers
were collected on an Intel Skylake CPU, and on an AMD Zen 3 CPU I
got a slightly larger speedup (2%/4%), and on a c6i.xlarge EC2 instance
I got a slightly lower speedup (1%/3%).

The low speedup on pyperformance is not entirely unexpected, because
BOLT improves i-cache behavior, and the benchmarks in the pyperformance
suite are small and tend to fit in i-cache.

This change uses the existing pgo profiling task (`python -m test --pgo`),
though I was able to measure about a 1% macrobenchmark improvement by
using the macrobenchmarks as the training task. I personally think that
both the PGO and BOLT tasks should be updated to use macrobenchmarks,
but for the sake of splitting up the work this PR uses the existing pgo task.

* Simplify the build flags

* Add a NEWS entry

* Update Makefile.pre.in

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* Update configure.ac

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* Add myself to ACKS

* Add docs

* Other review comments

* fix tab/space issue

* Make it more clear that --enable-bolt is experimental

* Add link to bolt's github page

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
3 years agoRemove manual build scripts for Windows dependencies and put them in the release...
Steve Dower [Thu, 18 Aug 2022 20:48:09 +0000 (21:48 +0100)] 
Remove manual build scripts for Windows dependencies and put them in the release-tools repository instead (GH-96088)

3 years agoGH-95861: Add support for Spearman's rank correlation coefficient (GH-95863)
Raymond Hettinger [Thu, 18 Aug 2022 18:48:27 +0000 (13:48 -0500)] 
GH-95861: Add support for Spearman's rank correlation coefficient (GH-95863)

3 years agoDocs: Escape lone stars in sqlite3 docs (#96081)
Erlend E. Aasland [Thu, 18 Aug 2022 18:39:36 +0000 (20:39 +0200)] 
Docs: Escape lone stars in sqlite3 docs (#96081)

3 years agogh-95271: Rework sqlite3 tutorial (#95749)
Erlend E. Aasland [Thu, 18 Aug 2022 18:36:20 +0000 (20:36 +0200)] 
gh-95271: Rework sqlite3 tutorial (#95749)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-93103: Doc uses PyConfig rather than deprecated vars (#96070)
Victor Stinner [Thu, 18 Aug 2022 14:58:38 +0000 (16:58 +0200)] 
gh-93103: Doc uses PyConfig rather than deprecated vars (#96070)

The C API documentation now uses the new PyConfig API, rather than
deprecated global configuration variables.

3 years agogh-95813: Improve HTMLParser from the view of inheritance (#95874)
Dong-hee Na [Thu, 18 Aug 2022 11:16:33 +0000 (20:16 +0900)] 
gh-95813: Improve HTMLParser from the view of inheritance (#95874)

* gh-95813: Improve HTMLParser from the view of inheritance

* gh-95813: Add unittest

* Address code review

3 years agogh-95913: Add traceback module additions to what's new in 3.11 (GH-95980)
Irit Katriel [Thu, 18 Aug 2022 10:37:41 +0000 (11:37 +0100)] 
gh-95913: Add traceback module additions to what's new in 3.11 (GH-95980)

3 years agogh-95913: make the new internal classes pdb.ModuleTarget/ScriptTarget private (GH...
Irit Katriel [Thu, 18 Aug 2022 10:16:07 +0000 (11:16 +0100)] 
gh-95913: make the new internal classes pdb.ModuleTarget/ScriptTarget private (GH-96053)

3 years agoRemove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex (GH-95948)
Matthias Görgens [Thu, 18 Aug 2022 09:19:21 +0000 (17:19 +0800)] 
Remove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex (GH-95948)

3 years agogh-90110: Update the c-analyzer Tool (gh-96058)
Eric Snow [Wed, 17 Aug 2022 22:54:59 +0000 (16:54 -0600)] 
gh-90110: Update the c-analyzer Tool (gh-96058)

3 years agogh-90110: Get the C Analyzer Tool Working Again (gh-96057)
Eric Snow [Wed, 17 Aug 2022 19:55:01 +0000 (13:55 -0600)] 
gh-90110: Get the C Analyzer Tool Working Again (gh-96057)

We broke it with a recent `_PyArg_Parser` change.

Also:
* moved the `_PyArg_Parser` whitelist entries over to ignored.tsv now that they are thread-safe
* added some known globals from a currently-excluded file
* dropped some outdated globals from the whitelist

3 years agoCorrect news entry. (GH-96043)
Mark Shannon [Wed, 17 Aug 2022 11:59:44 +0000 (12:59 +0100)] 
Correct news entry. (GH-96043)

3 years agoGH-95589: Dont crash when subclassing extension classes with multiple inheritance...
Mark Shannon [Wed, 17 Aug 2022 11:50:53 +0000 (12:50 +0100)] 
GH-95589: Dont crash when subclassing extension classes with multiple inheritance (GH-96028)

* Treat tp_weakref and tp_dictoffset like other opaque slots for multiple inheritance.

* Document Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF in what's new.