]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

3 years agogh-95991: Add some infrastructure for testing Limited API in _testcapi (GH-95992)
Petr Viktorin [Wed, 17 Aug 2022 11:48:43 +0000 (13:48 +0200)] 
gh-95991: Add some infrastructure for testing Limited API in _testcapi (GH-95992)

- Limited API needs to be enabled per source file
- Some builds don't support Limited API, so Limited API tests must be skipped on those builds
  (currently this is `Py_TRACE_REFS`, but that may change.)
- `Py_LIMITED_API` must be defined before `<Python.h>` is included.

This puts the hoop-jumping in `testcapi/parts.h`, so individual
test files can be relatively simple. (Currently that's only
`vectorcall_limited.c`, imagine more.)

3 years agoGH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)
Ken Jin [Wed, 17 Aug 2022 11:37:07 +0000 (19:37 +0800)] 
GH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)

3 years agogh-95736: Fix event loop creation in IsolatedAsyncioTestCase (GH-96033)
Serhiy Storchaka [Wed, 17 Aug 2022 09:05:17 +0000 (12:05 +0300)] 
gh-95736: Fix event loop creation in IsolatedAsyncioTestCase (GH-96033)

It should be created before calling the setUp() method, but after
checking for skipping a test.

Automerge-Triggered-By: GH:tiran
3 years agogh-96005: FreeBSD has ENOTCAPABLE, too (GH-96034)
Christian Heimes [Wed, 17 Aug 2022 05:24:53 +0000 (07:24 +0200)] 
gh-96005: FreeBSD has ENOTCAPABLE, too (GH-96034)

3 years agoGH-95704: Don't suppress errors from tasks when TG is cancelled (#95761)
Guido van Rossum [Wed, 17 Aug 2022 01:23:06 +0000 (18:23 -0700)] 
GH-95704: Don't suppress errors from tasks when TG is cancelled (#95761)

When a task catches CancelledError and raises some other error,
the other error should not silently be suppressed.

Any scenario where a task crashes in cleanup upon cancellation
will now result in an ExceptionGroup wrapping the crash(es)
instead of propagating CancelledError and ignoring the side errors.

NOTE: This represents a change in behavior (hence the need to
change several tests).  But it is only an edge case.

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
3 years agoGH-95909: Make `_PyArg_Parser` initialization thread safe (GH-95958)
Kumar Aditya [Tue, 16 Aug 2022 18:22:14 +0000 (23:52 +0530)] 
GH-95909: Make `_PyArg_Parser` initialization thread safe  (GH-95958)

3 years agogh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)
Christian Heimes [Tue, 16 Aug 2022 18:20:15 +0000 (20:20 +0200)] 
gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)

- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
  files `pybuilddir.txt` and `pyenv.cfg`.

3 years agogh-94823: Improve coverage in tokenizer.c:valid_utf8 (GH-94856)
Michael Droettboom [Tue, 16 Aug 2022 15:54:13 +0000 (11:54 -0400)] 
gh-94823: Improve coverage in tokenizer.c:valid_utf8 (GH-94856)

When loading a source file from disk, there is a separate UTF-8 validator
distinct from the one in `unicode_decode_utf8`. This exercises that code path
with the same set of invalid inputs as we use for testing the "other" UTF-8
decoder.

3 years agoGH-95736: fix IsolatedAsyncioTestCase to initialize Runner before calling setup funct...
Kumar Aditya [Tue, 16 Aug 2022 15:52:06 +0000 (21:22 +0530)] 
GH-95736: fix IsolatedAsyncioTestCase to initialize Runner before calling setup functions  (#95898)

3 years agoGH-95245: Move weakreflist into the pre-header. (GH-95996)
Mark Shannon [Tue, 16 Aug 2022 12:57:18 +0000 (13:57 +0100)] 
GH-95245: Move weakreflist into the pre-header. (GH-95996)

3 years agoremove repetitive credit from what's new in 3.11 rst (GH-96024)
Irit Katriel [Tue, 16 Aug 2022 12:47:07 +0000 (13:47 +0100)] 
remove repetitive credit from what's new in 3.11 rst (GH-96024)

3 years agogh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964)
Christian Heimes [Tue, 16 Aug 2022 11:44:02 +0000 (13:44 +0200)] 
gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoChange CODEOWNERS entries for iritkatriel (GH-96008)
Irit Katriel [Tue, 16 Aug 2022 08:38:32 +0000 (09:38 +0100)] 
Change CODEOWNERS entries for iritkatriel (GH-96008)

3 years agogh-95808: Add missing early returns in _asynciomodule.c (#95809)
Yury Selivanov [Mon, 15 Aug 2022 23:32:40 +0000 (16:32 -0700)] 
gh-95808: Add missing early returns in _asynciomodule.c (#95809)

3 years agogh-78143: IDLE - fix settings dialog page label. (#96009)
Terry Jan Reedy [Mon, 15 Aug 2022 23:03:56 +0000 (19:03 -0400)] 
gh-78143: IDLE - fix settings dialog page label. (#96009)

'/Tab' should have been removed from the font page label
when the tab-spaces setting was moved to the Windows page.

3 years agoGH-94808: Test __build_class__ inside non-dict __builtins__ (GH-95932)
Michael Droettboom [Mon, 15 Aug 2022 17:39:06 +0000 (13:39 -0400)] 
GH-94808: Test __build_class__ inside non-dict __builtins__ (GH-95932)

3 years agoGH-95899: fix asyncio.Runner to call set_event_loop only once (#95900)
Kumar Aditya [Mon, 15 Aug 2022 17:02:47 +0000 (22:32 +0530)] 
GH-95899: fix asyncio.Runner to call set_event_loop only once (#95900)

3 years agogh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)
Shreenidhi Shedi [Mon, 15 Aug 2022 14:48:07 +0000 (20:18 +0530)] 
gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)

If kernel fips is enabled, we get permission error upon doing
`import crypt`. So, if kernel fips is enabled, disable the
unallowed hashing methods.

Python 3.9.1 (default, May 10 2022, 11:36:26)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import crypt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/crypt.py", line 117, in <module>
    _add_method('MD5', '1', 8, 34)
  File "/usr/lib/python3.9/crypt.py", line 94, in _add_method
    result = crypt('', salt)
  File "/usr/lib/python3.9/crypt.py", line 82, in crypt
    return _crypt.crypt(word, salt)
PermissionError: [Errno 1] Operation not permitted

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
3 years agogh-95707: Fix function signature (GH-95995)
Christian Heimes [Mon, 15 Aug 2022 14:06:28 +0000 (16:06 +0200)] 
gh-95707: Fix function signature (GH-95995)

3 years agoGH-95707: Fix uses of `Py_TPFLAGS_MANAGED_DICT` (GH-95854)
Mark Shannon [Mon, 15 Aug 2022 11:29:27 +0000 (12:29 +0100)] 
GH-95707: Fix uses of `Py_TPFLAGS_MANAGED_DICT` (GH-95854)

* Make sure that tp_dictoffset is correct with Py_TPFLAGS_MANAGED_DICT is set.

* Avoid traversing managed dict twice when subclassing class with Py_TPFLAGS_MANAGED_DICT set.

3 years agogh-95853: Address wasm build and test issues (GH-95985)
Christian Heimes [Mon, 15 Aug 2022 05:41:10 +0000 (07:41 +0200)] 
gh-95853: Address wasm build and test issues (GH-95985)

3 years agoClarify asyncio.Runner docs re: loop_factory (#95979)
Kumar Aditya [Sun, 14 Aug 2022 15:53:34 +0000 (21:23 +0530)] 
Clarify asyncio.Runner docs re: loop_factory (#95979)

3 years agoGH-95977: Speed up calling pure python descriptor __get__ with vectorcall (gh-95978)
Kumar Aditya [Sun, 14 Aug 2022 15:13:42 +0000 (20:43 +0530)] 
GH-95977: Speed up calling pure python descriptor __get__ with vectorcall (gh-95978)

3 years agobpo-40222: Mark exception table function in the dis module as private (#95961)
Pablo Galindo Salgado [Sun, 14 Aug 2022 14:42:31 +0000 (15:42 +0100)] 
bpo-40222: Mark exception table function in the dis module as private (#95961)

3 years agogh-95853: Add script to automate WASM build (GH-95828) 95955/head
Christian Heimes [Sat, 13 Aug 2022 19:56:08 +0000 (21:56 +0200)] 
gh-95853: Add script to automate WASM build (GH-95828)

Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.

Co-authored-by: Brett Cannon <brett@python.org>
3 years agogh-89313: Add hashlib.file_digest to whatsnew 3.11 (GH-95965)
Christian Heimes [Sat, 13 Aug 2022 19:00:58 +0000 (21:00 +0200)] 
gh-89313: Add hashlib.file_digest to whatsnew 3.11 (GH-95965)

Automerge-Triggered-By: GH:pablogsal
3 years agobpo-25625: Document contextlib.chdir in the 3.11 what's new (#95962)
Pablo Galindo Salgado [Sat, 13 Aug 2022 18:27:44 +0000 (19:27 +0100)] 
bpo-25625: Document contextlib.chdir in the 3.11 what's new (#95962)

3 years agogh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)
Irit Katriel [Sat, 13 Aug 2022 11:49:04 +0000 (12:49 +0100)] 
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)

3 years agogh-90928: Improve static initialization of keywords tuple in AC (#95907)
Erlend E. Aasland [Sat, 13 Aug 2022 10:09:40 +0000 (12:09 +0200)] 
gh-90928: Improve static initialization of keywords tuple in AC (#95907)

3 years agogh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_key...
Howie Zhao [Sat, 13 Aug 2022 04:23:33 +0000 (12:23 +0800)] 
gh-94439: typing docs: Add minimum version to `__required_keys__` and `__optional_keys__` (#95373)

3 years agoFix typo in internal/pycore_atomic.h (GH-95939)
fluesvamp [Sat, 13 Aug 2022 03:40:41 +0000 (22:40 -0500)] 
Fix typo in internal/pycore_atomic.h (GH-95939)

3 years agogh-94909: fix joining of absolute and relative Windows paths in pathlib (GH-95450)
Barney Gale [Fri, 12 Aug 2022 21:23:41 +0000 (22:23 +0100)] 
gh-94909: fix joining of absolute and relative Windows paths in pathlib  (GH-95450)

Have pathlib use `os.path.join()` to join arguments to the `PurePath` initialiser, which fixes a minor bug when handling relative paths with drives.

Previously:

```python
>>> from pathlib import PureWindowsPath
>>> a = 'C:/a/b'
>>> b = 'C:x/y'
>>> PureWindowsPath(a, b)
PureWindowsPath('C:x/y')
```

Now:

```python
>>> PureWindowsPath(a, b)
PureWindowsPath('C:/a/b/x/y')
```

3 years agogh-94996: Disallow lambda pos only params with feature_version < (3, 8) (GH-95934)
Shantanu [Fri, 12 Aug 2022 18:41:02 +0000 (11:41 -0700)] 
gh-94996: Disallow lambda pos only params with feature_version < (3, 8) (GH-95934)

3 years agogh-94996: Disallow parsing pos only params with feature_version < (3, 8) (GH-94997)
Shantanu [Fri, 12 Aug 2022 17:27:50 +0000 (10:27 -0700)] 
gh-94996: Disallow parsing pos only params with feature_version < (3, 8) (GH-94997)

3 years agogh-90300: [docs] Add whatsnew entry for new --help output (GH-95856) (GH-95928)
Łukasz Langa [Fri, 12 Aug 2022 16:22:25 +0000 (18:22 +0200)] 
gh-90300: [docs] Add whatsnew entry for new --help output (GH-95856) (GH-95928)

Co-authored-by: Éric <merwok@netwok.org>
3 years agogh-82180: Document support for non-integer arg removed from grp.getgrgid in 3.10...
Hugo van Kemenade [Fri, 12 Aug 2022 16:22:06 +0000 (19:22 +0300)] 
gh-82180: Document support for non-integer arg removed from grp.getgrgid in 3.10 (GH-95346)

3 years agogh-95914: Add missing PEPs to the Summary section of 3.11 What's New (GH-95916)
CAM Gerlach [Fri, 12 Aug 2022 15:50:01 +0000 (10:50 -0500)] 
gh-95914: Add missing PEPs to the Summary section of 3.11 What's New (GH-95916)

3 years agogh-95922: compiler's eliminate_empty_basic_blocks ignores the last block of the compi...
Irit Katriel [Fri, 12 Aug 2022 15:35:09 +0000 (16:35 +0100)] 
gh-95922: compiler's eliminate_empty_basic_blocks ignores the last block of the compilation unit (GH-95924)

3 years agogh-95724: Clarify taskgroups.py license. (#95847)
Yury Selivanov [Thu, 11 Aug 2022 23:12:06 +0000 (16:12 -0700)] 
gh-95724: Clarify taskgroups.py license. (#95847)

3 years agogh-95273: Improve sqlite3.complete_statement docs (#95840)
Erlend E. Aasland [Thu, 11 Aug 2022 23:05:12 +0000 (01:05 +0200)] 
gh-95273: Improve sqlite3.complete_statement docs (#95840)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code (gh-95860)
Eric Snow [Thu, 11 Aug 2022 21:25:49 +0000 (15:25 -0600)] 
gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code (gh-95860)

We only statically initialize for core code and builtin modules.  Extension modules still create
the tuple at runtime.  We'll solve that part of interpreter isolation separately.

This change includes generated code. The non-generated changes are in:

* Tools/clinic/clinic.py
* Python/getargs.c
* Include/cpython/modsupport.h
* Makefile.pre.in (re-generate global strings after running clinic)
* very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c

All other changes are generated code (clinic, global strings).

3 years agogh-95841: IDLE - Revise Windows local doc url (#95845)
Terry Jan Reedy [Thu, 11 Aug 2022 20:54:03 +0000 (16:54 -0400)] 
gh-95841: IDLE - Revise Windows local doc url (#95845)

#91242 replaced the Windows chm help file with a copy
of the html docs.  This PR replaces the IDLE code that
fetches the Windows local help url passed to os.startfile.
Co-authored-by: Steve Dower
3 years agogh-84910: Change 'IDLE Help' to 'IDLE Doc' (#95873)
Terry Jan Reedy [Thu, 11 Aug 2022 20:50:49 +0000 (16:50 -0400)] 
gh-84910: Change 'IDLE Help' to 'IDLE Doc' (#95873)

'IDLE Help' was a plain text file.  It was superceded years ago
by a copy of the much more complete html doc.  .

3 years agogh-87092: compiler's codegen stage uses int jump target labels, and the target pointe...
Irit Katriel [Thu, 11 Aug 2022 16:40:49 +0000 (17:40 +0100)] 
gh-87092: compiler's codegen stage uses int jump target labels, and the target pointer is only calculated just before optimization stage (GH-95655)

3 years agoGH-95818: Skip incomplete frames in `PyThreadState_GetFrame` (GH-95886)
Mark Shannon [Thu, 11 Aug 2022 13:06:32 +0000 (14:06 +0100)] 
GH-95818: Skip incomplete frames in `PyThreadState_GetFrame` (GH-95886)

3 years agoUpdate _PyEval_AddPendingCall comment (#95817)
zhanpon [Thu, 11 Aug 2022 11:32:52 +0000 (20:32 +0900)] 
Update _PyEval_AddPendingCall comment (#95817)

3 years agogh-95878: Fix format char in datetime CAPI tests (GH-95879)
Christian Heimes [Thu, 11 Aug 2022 09:58:10 +0000 (11:58 +0200)] 
gh-95878: Fix format char in datetime CAPI tests (GH-95879)

3 years agogh-95876: Fix format string in pegen error location code (#95877)
Christian Heimes [Thu, 11 Aug 2022 08:55:57 +0000 (10:55 +0200)] 
gh-95876: Fix format string in pegen error location code (#95877)

3 years agogh-90385: Add pathlib.Path.walk what's new section (GH-95467)
Stanislav Zmiev [Thu, 11 Aug 2022 07:31:46 +0000 (11:31 +0400)] 
gh-90385: Add pathlib.Path.walk what's new section (GH-95467)

Automerge-Triggered-By: GH:brettcannon
3 years agoDocs: replace 'currying' by 'partial function'. (#91814)
Clemens Tolboom [Thu, 11 Aug 2022 06:23:40 +0000 (08:23 +0200)] 
Docs: replace 'currying' by 'partial function'. (#91814)

3 years agogh-75510: Edit idlelib entry in doc (#95869)
Terry Jan Reedy [Thu, 11 Aug 2022 02:44:17 +0000 (22:44 -0400)] 
gh-75510: Edit idlelib entry in doc (#95869)

Make section instead of subsection and revise sentence.