]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-46712: share more global strings in deepfreeze (gh-32152)
Kumar Aditya [Tue, 19 Apr 2022 17:41:36 +0000 (23:11 +0530)] 
bpo-46712: share more global strings in deepfreeze (gh-32152)

(for gh-90868)

3 years agogh-74166: make all_errors keyword-only (GH-91704)
Irit Katriel [Tue, 19 Apr 2022 17:16:20 +0000 (18:16 +0100)] 
gh-74166: make all_errors keyword-only (GH-91704)

3 years agobpo-40859: Update Windows build to use xz-5.2.5 (GH-20622)
Ma Lin [Tue, 19 Apr 2022 16:36:51 +0000 (00:36 +0800)] 
bpo-40859: Update Windows build to use xz-5.2.5 (GH-20622)

3 years agogh-91616: re module, fix .fullmatch() mismatch when using Atomic Grouping or Possessi...
Ma Lin [Tue, 19 Apr 2022 14:49:36 +0000 (22:49 +0800)] 
gh-91616: re module, fix .fullmatch() mismatch when using Atomic Grouping or Possessive Quantifiers (GH-91681)

These jumps should use DO_JUMP0() instead of DO_JUMP():
- JUMP_POSS_REPEAT_1
- JUMP_POSS_REPEAT_2
- JUMP_ATOMIC_GROUP

3 years agogh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112)
Victor Stinner [Tue, 19 Apr 2022 14:27:00 +0000 (16:27 +0200)] 
gh-91231: Add shutdown_timeout to multiprocessing BaseManager (#32112)

Add an optional keyword 'shutdown_timeout' parameter to the
multiprocessing.BaseManager constructor. Kill the process if
terminate() takes longer than the timeout.

Multiprocessing tests pass test.support.SHORT_TIMEOUT
to BaseManager.shutdown_timeout.

3 years agoAdd more tests for group names and refs in RE (GH-91695)
Serhiy Storchaka [Tue, 19 Apr 2022 13:56:51 +0000 (16:56 +0300)] 
Add more tests for group names and refs in RE (GH-91695)

3 years agogh-90699: Use module state to access insert str object. (GH-91693)
Dong-hee Na [Tue, 19 Apr 2022 13:12:46 +0000 (22:12 +0900)] 
gh-90699: Use module state to access insert str object. (GH-91693)

3 years agoDoc: Fix link formatting typo (GH-91659)
slateny [Tue, 19 Apr 2022 09:15:46 +0000 (02:15 -0700)] 
Doc: Fix link formatting typo (GH-91659)

3 years agogh-74166: break cycle by clearing the list instead of dropping its reference (GH...
Irit Katriel [Tue, 19 Apr 2022 09:09:10 +0000 (10:09 +0100)] 
gh-74166: break cycle by clearing the list instead of dropping its reference (GH-91685)

3 years agogh-90997: bpo-46841: Disassembly of quickened code (GH-32099)
penguin_wwy [Tue, 19 Apr 2022 08:45:08 +0000 (16:45 +0800)] 
gh-90997: bpo-46841: Disassembly of quickened code (GH-32099)

3 years agobpo-40421: Cleanup PyFrame C API (GH-32417)
Victor Stinner [Tue, 19 Apr 2022 07:53:10 +0000 (09:53 +0200)] 
bpo-40421: Cleanup PyFrame C API (GH-32417)

3 years agogh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings (#31711)
Oleg Iarygin [Tue, 19 Apr 2022 02:56:53 +0000 (05:56 +0300)] 
gh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings (#31711)

Closes GH-91098.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46014: Add docs regarding `functools.singledispatch` changes in 3.11 (#32282)
Yurii Karabas [Tue, 19 Apr 2022 02:50:59 +0000 (05:50 +0300)] 
bpo-46014: Add docs regarding `functools.singledispatch` changes in 3.11 (#32282)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)
Inada Naoki [Tue, 19 Apr 2022 02:44:36 +0000 (11:44 +0900)] 
gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)

`TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None.
But it is very rarely works, and never documented behavior.

3 years agogh-74166: Add option to get all errors from socket.create_connection (GH-91586)
Irit Katriel [Mon, 18 Apr 2022 22:15:41 +0000 (23:15 +0100)] 
gh-74166: Add option to get all errors from socket.create_connection (GH-91586)

3 years agogh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)
Bryan Weber [Mon, 18 Apr 2022 21:01:18 +0000 (17:01 -0400)] 
gh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)

* Removes SO config variable in sysconfig

Per @warsaw in https://github.com/python/cpython/issues/63754, this was
deprecated in Python 3.4 and was suggested for removal in Python 3.5.

* Add NEWS

* Update Misc/NEWS.d/next/Library/2022-04-18-15-23-24.gh-issue-91670.6eyChw.rst

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Éric <merwok@netwok.org>
3 years agogh-91102: Use Argument Clinic for EncodingMap (#31725)
Oleg Iarygin [Mon, 18 Apr 2022 20:43:56 +0000 (23:43 +0300)] 
gh-91102: Use Argument Clinic for EncodingMap  (#31725)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoAdd some information about where pynche has moved to (#91650)
Barry Warsaw [Mon, 18 Apr 2022 14:34:53 +0000 (07:34 -0700)] 
Add some information about where pynche has moved to (#91650)

3 years agogh-91576: Speed up iteration of strings (#91574)
Kumar Aditya [Mon, 18 Apr 2022 14:18:27 +0000 (19:48 +0530)] 
gh-91576: Speed up iteration of strings (#91574)

3 years agobpo-47256: Increasing the depth of backtracking in RE (GH-32411)
Ma Lin [Mon, 18 Apr 2022 13:50:40 +0000 (21:50 +0800)] 
bpo-47256: Increasing the depth of backtracking in RE (GH-32411)

Limit the maximum capturing group to 2**30-1 on 64-bit platforms
(it was 2**31-1). No change on 32-bit platforms (2**28-1).

It allows to reduce the size of SRE(match_context):
- On 32 bit platform: 36 bytes, no change.  (msvc2022)
- On 64 bit platform: 72 bytes -> 56 bytes. (msvc2022/gcc9.4)

which leads to increasing the depth of backtracking.

3 years agogh-91575: Update case-insensitive matching in re to the latest Unicode version (GH...
Serhiy Storchaka [Mon, 18 Apr 2022 09:26:30 +0000 (12:26 +0300)] 
gh-91575: Update case-insensitive matching in re to the latest Unicode version (GH-91580)

3 years agobpo-46053: Fix OSS audio support on NetBSD (GH-30065)
Thomas Klausner [Mon, 18 Apr 2022 09:12:39 +0000 (11:12 +0200)] 
bpo-46053: Fix OSS audio support on NetBSD (GH-30065)

3 years agogh-91265: Make old ctypes.macholib tests runned by `python -m test` (gh-32094)
Oleg Iarygin [Mon, 18 Apr 2022 07:27:09 +0000 (10:27 +0300)] 
gh-91265: Make old ctypes.macholib tests runned by `python -m test` (gh-32094)

* Move tests from ctypes.macholib.dy* to ctypes.test

3 years agoRemove ill-formed an unneeded news entry (GH-91657)
Raymond Hettinger [Mon, 18 Apr 2022 05:27:41 +0000 (00:27 -0500)] 
Remove ill-formed an unneeded news entry (GH-91657)

3 years agobpo-21150: Add quick link/summary table to the top of argparse documentation (GH...
Susan Su [Mon, 18 Apr 2022 04:46:18 +0000 (21:46 -0700)] 
bpo-21150: Add quick link/summary table to the top of argparse documentation (GH-12005)

No work has been done to move this forward.  On the theory that perfect is the enemy of good, I'm going to push it and we can make minor edits as needed afterwards.

3 years agoRemove duplicate explanation (GH-91534)
Gouvernathor [Mon, 18 Apr 2022 04:26:40 +0000 (06:26 +0200)] 
Remove duplicate explanation (GH-91534)

3 years agoUpdate: usage doc for heappushpop (GH-91451)
Aditya Aggarwal [Mon, 18 Apr 2022 04:12:33 +0000 (23:12 -0500)] 
Update: usage doc for heappushpop (GH-91451)

3 years agogh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)
Oleg Iarygin [Mon, 18 Apr 2022 03:39:32 +0000 (06:39 +0300)] 
gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-85567: Register a cleanup function to close files for FileType objects in argparse...
achhina [Mon, 18 Apr 2022 01:53:37 +0000 (21:53 -0400)] 
gh-85567: Register a cleanup function to close files for FileType objects in argparse (#32257)

* bpo-41395: Register a cleanup function to close files for FileType objects in argparse

* Added import as top level import, and renamed file as fh.

3 years agoRemove the ancient Pynche color editor (#91554)
Barry Warsaw [Sun, 17 Apr 2022 22:38:44 +0000 (15:38 -0700)] 
Remove the ancient Pynche color editor (#91554)

Closes #91551

3 years agogh-91217: deprecate ossaudiodev (GH-91641)
Brett Cannon [Sun, 17 Apr 2022 22:02:36 +0000 (15:02 -0700)] 
gh-91217: deprecate ossaudiodev (GH-91641)

Automerge-Triggered-By: GH:brettcannon
3 years agogh-89885: Improve import example in language reference (#91523)
slateny [Sun, 17 Apr 2022 21:20:13 +0000 (14:20 -0700)] 
gh-89885: Improve import example in language reference (#91523)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-91541: Fix error in example in modules tutorial (#91634)
180909 [Sun, 17 Apr 2022 21:17:04 +0000 (05:17 +0800)] 
gh-91541: Fix error in example in modules tutorial (#91634)

3 years agogh-90923: Improve sqlite3.Connection.execute* docs (#91643)
Erlend Egeberg Aasland [Sun, 17 Apr 2022 21:12:55 +0000 (23:12 +0200)] 
gh-90923: Improve sqlite3.Connection.execute* docs (#91643)

- Drop 'nonstandard'; it does not add any value
- Try to be more concise
- Make return value a little more explicit

3 years agoUse git attribute macros for CRLF and no-EOL files (GH-30762)
Erlend Egeberg Aasland [Sun, 17 Apr 2022 20:53:31 +0000 (22:53 +0200)] 
Use git attribute macros for CRLF and no-EOL files (GH-30762)

3 years agogh-91625: Don't ignore extended args of adaptive opcodes (GH-91626)
Dennis Sweeney [Sun, 17 Apr 2022 18:04:29 +0000 (14:04 -0400)] 
gh-91625: Don't ignore extended args of adaptive opcodes (GH-91626)

3 years agogh-91298: Refine traversable (apply changes from importlib_resources 5.7.1) (#91623)
Jason R. Coombs [Sun, 17 Apr 2022 15:10:36 +0000 (11:10 -0400)] 
gh-91298: Refine traversable (apply changes from importlib_resources 5.7.1) (#91623)

* bpo-47142: Refine traversable (apply changes from importlib_resources 5.7.1)

* Replace changelog referencing github issue.

3 years agobpo-46126: Restore docstrings in importlib.metadata tests. (#32288)
Jason R. Coombs [Sun, 17 Apr 2022 15:10:26 +0000 (11:10 -0400)] 
bpo-46126: Restore docstrings in importlib.metadata tests. (#32288)

3 years agoFix refleaks in PyErr_SetHandledException (GH-91627)
Dennis Sweeney [Sun, 17 Apr 2022 06:52:53 +0000 (02:52 -0400)] 
Fix refleaks in PyErr_SetHandledException (GH-91627)

3 years agogh-78607: Replace __ltrace__ with __lltrace__ (GH-91619)
Dennis Sweeney [Sat, 16 Apr 2022 22:57:00 +0000 (18:57 -0400)] 
gh-78607: Replace __ltrace__ with __lltrace__ (GH-91619)

3 years agogh-91462: Make lltrace output human-readable. (GH-91463)
Dennis Sweeney [Sat, 16 Apr 2022 21:36:29 +0000 (17:36 -0400)] 
gh-91462: Make lltrace output human-readable. (GH-91463)

* Transform opcodes into opnames
* Print the whole stack at each opcode, and eliminate prtrace output at each (push/pop/stackadj)
* Display info about the function at each resume_frame

3 years agogh-86178: wsgiref.types: Add missing TypeAlias annotations (GH-91608)
Sebastian Rittau [Sat, 16 Apr 2022 20:37:02 +0000 (22:37 +0200)] 
gh-86178: wsgiref.types: Add missing TypeAlias annotations (GH-91608)

3 years agogh-91217: deprecate nis (GH-91606)
Brett Cannon [Sat, 16 Apr 2022 20:17:30 +0000 (13:17 -0700)] 
gh-91217: deprecate nis (GH-91606)

Automerge-Triggered-By: GH:brettcannon
3 years agoFix an out of date comment in compile.c (GH-91615)
Irit Katriel [Sat, 16 Apr 2022 19:40:02 +0000 (20:40 +0100)] 
Fix an out of date comment in compile.c (GH-91615)

3 years agogh-89770: Implement PEP-678 - Exception notes (GH-31317)
Irit Katriel [Sat, 16 Apr 2022 18:59:52 +0000 (19:59 +0100)] 
gh-89770: Implement PEP-678 - Exception notes (GH-31317)

3 years agogh-91607: Fix several test_concurrent_futures tests to actually test what they claim...
Gregory P. Smith [Sat, 16 Apr 2022 18:46:33 +0000 (11:46 -0700)] 
gh-91607: Fix several test_concurrent_futures tests to actually test what they claim (#91600)

* Fix test_concurrent_futures to actually test what it says.

Many ProcessPoolExecutor based tests were ignoring the mp_context
and using the default instead.  This meant we lacked proper test
coverage of all of them.

Also removes the old _prime_executor() worker delay seeding code
as it appears to have no point and causes 20-30 seconds extra
latency on this already long test.  It also interfered with some
of the refactoring to fix the above to not needlessly create their
own executor when setUp has already created an appropriate one.

* Don't import the name from multiprocessing directly to avoid confusion.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agogh-86178: Add wsgiref.types (GH-32335)
Sebastian Rittau [Sat, 16 Apr 2022 17:37:58 +0000 (19:37 +0200)] 
gh-86178: Add wsgiref.types (GH-32335)

3 years agobpo-40676: Use Argument Clinic for csv (where possible) (GH-20200)
Shantanu [Sat, 16 Apr 2022 17:34:23 +0000 (10:34 -0700)] 
bpo-40676: Use Argument Clinic for csv (where possible) (GH-20200)

3 years agogh-89263: Add typing.get_overloads (GH-31716)
Jelle Zijlstra [Sat, 16 Apr 2022 16:01:43 +0000 (09:01 -0700)] 
gh-89263: Add typing.get_overloads (GH-31716)

Based on suggestions by Guido van Rossum, Spencer Brown, and Alex Waygood.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
3 years agogh-91595: fix the comparison of character and integer by using ord() (#91596)
Yu Liu [Sat, 16 Apr 2022 14:34:48 +0000 (09:34 -0500)] 
gh-91595: fix the comparison of character and integer by using ord() (#91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 years agogh-69093: sqlite3 blob doc amendments (GH-91561)
Erlend Egeberg Aasland [Sat, 16 Apr 2022 13:28:38 +0000 (15:28 +0200)] 
gh-69093: sqlite3 blob doc amendments (GH-91561)

- document that you cannot open a blob handle in a WITHOUT ROWID table
- document the blobopen() positional arguments in the same order as they
  appear
- relocate sqlite3.Blob section

3 years agobpo-43224: Add tests for TypeVarTuple substitution in Annotated (GH-31846)
Matthew Rahtz [Sat, 16 Apr 2022 04:24:28 +0000 (05:24 +0100)] 
bpo-43224: Add tests for TypeVarTuple substitution in Annotated (GH-31846)

3 years agogh-82849: revise intro to os.path.rst (GH-32232)
Jack DeVries [Sat, 16 Apr 2022 04:23:07 +0000 (00:23 -0400)] 
gh-82849: revise intro to os.path.rst (GH-32232)

* revise the first paragraph of docs for os.path
* add a mention of `os.PathLike` protocol
* remove warnings rendered irrelevant by :pep:`383` and :pep:`529`

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-69093: Add context manager support to sqlite3.Blob (GH-91562)
Erlend Egeberg Aasland [Sat, 16 Apr 2022 04:21:12 +0000 (06:21 +0200)] 
gh-69093: Add context manager support to sqlite3.Blob (GH-91562)

3 years agoIssue templates: Remove duplicate links to security policy (#91590)
Alex Waygood [Sat, 16 Apr 2022 02:06:51 +0000 (03:06 +0100)] 
Issue templates: Remove duplicate links to security policy (#91590)

* Remove security link from config file
* Delete security.md

3 years agoAdd minimal issue templates (#91569)
Alex Waygood [Sat, 16 Apr 2022 01:20:54 +0000 (02:20 +0100)] 
Add minimal issue templates (#91569)

* Add minimal issue templates
* Wording tweaks
* Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Improve words in `security` template
* Update bug.md
* Update crash.md
* Add link to security vulnerability website from first page
* Never edit on your phone
* Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update .github/ISSUE_TEMPLATE/config.yml
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* There might not be a traceback if there's a crash
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Update .github/ISSUE_TEMPLATE/config.yml
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Reorder `config.yml` file
* Fix Erlend's nits
* version -> architecture
* Apply suggestions from code review
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agoAdd link to documentation translation list (#91560)
slateny [Sat, 16 Apr 2022 01:18:10 +0000 (18:18 -0700)] 
Add link to documentation translation list (#91560)

3 years agogh-91487: Optimize asyncio UDP speed (GH-91488)
msoxzw [Fri, 15 Apr 2022 19:59:01 +0000 (19:59 +0000)] 
gh-91487: Optimize asyncio UDP speed (GH-91488)

Fix #91487

When transferring a small file, e.g. 256 KiB, the speed of this PR is comparable. However, if a large file, e.g. 65536 KiB, is transferred, asyncio UDP will be over 100 times faster than the original. The speed is presumably significantly faster if a larger file is transferred, e.g. 1048576 KiB.

Automerge-Triggered-By: GH:gpshead
3 years agogh-91217: deprecate nntplib (GH-91543)
Brett Cannon [Fri, 15 Apr 2022 19:32:56 +0000 (12:32 -0700)] 
gh-91217: deprecate nntplib (GH-91543)

3 years agogh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative (GH-32215)
Irit Katriel [Fri, 15 Apr 2022 19:19:24 +0000 (20:19 +0100)] 
gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative (GH-32215)

3 years agogh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531)
Irit Katriel [Fri, 15 Apr 2022 18:57:47 +0000 (19:57 +0100)] 
gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531)

3 years agogh-69093: improve sqlite3.Connection.blobopen() error handling (GH-91571)
Erlend Egeberg Aasland [Fri, 15 Apr 2022 16:27:39 +0000 (18:27 +0200)] 
gh-69093: improve sqlite3.Connection.blobopen() error handling (GH-91571)

Unless sqlite3_blob_open() returns SQLITE_MISUSE, the error code and
message are available on the connection object. This means we have to
handle SQLITE_MISUSE error messages explicitly.

3 years agogh-91404: Use computed gotos and reduce indirection in re (#91495)
Brandt Bucher [Fri, 15 Apr 2022 16:26:44 +0000 (09:26 -0700)] 
gh-91404: Use computed gotos and reduce indirection in re (#91495)

3 years agogh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570)
Erlend Egeberg Aasland [Fri, 15 Apr 2022 16:25:03 +0000 (18:25 +0200)] 
gh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570)

3 years agogh-90699: Use _Py_STR(empty) instead of PyUnicode_New(0, 0) for BUILD_STRING (GH...
Dennis Sweeney [Fri, 15 Apr 2022 14:21:35 +0000 (10:21 -0400)] 
gh-90699: Use _Py_STR(empty) instead of PyUnicode_New(0, 0) for BUILD_STRING (GH-91476)

3 years agogh-69093: Expose sqlite3.Blob as a class (GH-91550)
Jelle Zijlstra [Fri, 15 Apr 2022 13:29:57 +0000 (06:29 -0700)] 
gh-69093: Expose sqlite3.Blob as a class (GH-91550)

I noticed this was missing while writing typeshed stubs. It's
useful to expose it for use in annotations and for exploration.

3 years agogh-79156: Add start_tls() method to streams API (#91453)
Oleg Iarygin [Fri, 15 Apr 2022 12:23:14 +0000 (15:23 +0300)] 
gh-79156: Add start_tls() method to streams API (#91453)

The existing event loop `start_tls()` method is not sufficient for
connections using the streams API. The existing StreamReader works
because the new transport passes received data to the original protocol.
The StreamWriter must then write data to the new transport, and the
StreamReaderProtocol must be updated to close the new transport
correctly.

The new StreamWriter `start_tls()` updates itself and the reader
protocol to the new SSL transport.

Co-authored-by: Ian Good <icgood@gmail.com>
3 years agobpo-40376: slightly improved the wording for os.getgrouplist (GH-19702)
Jens Holzkämper [Fri, 15 Apr 2022 03:55:07 +0000 (05:55 +0200)] 
bpo-40376: slightly improved the wording for os.getgrouplist (GH-19702)

The documentation for os.getgrouplist potentially read like it
returned all groups a user belongs to but it potentially doesn't.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoRemove usage of _Py_IDENTIFIER from unicodedata module. (GH-91532)
Dong-hee Na [Fri, 15 Apr 2022 01:44:05 +0000 (10:44 +0900)] 
Remove usage of _Py_IDENTIFIER from unicodedata module. (GH-91532)

3 years agogh-70979: Fix runpy.run_path parameter name in docs (GH-32265)
Jelle Zijlstra [Fri, 15 Apr 2022 01:06:58 +0000 (18:06 -0700)] 
gh-70979: Fix runpy.run_path parameter name in docs (GH-32265)

Noticed while reviewing GH-30729.

3 years agogh-91520: Rewrite imghdr inlining for clarity and completeness (#91521)
Barry Warsaw [Fri, 15 Apr 2022 00:48:59 +0000 (17:48 -0700)] 
gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521)

* Rewrite imghdr inlining for clarity and completeness

* Move MIMEImage class back closer to the top of the file since it's the
  important thing.
* Use a decorate to mark a given rule function and simplify the rule function
  names for clarity.
* Copy over all the imghdr test data files into the email package's test data
  directory.  This way when imghdr is actually removed, it won't affect the
  MIMEImage guessing tests.
* Rewrite and extend the MIMEImage tests to test for all supported
  auto-detected MIME image subtypes.
* Remove the now redundant PyBanner048.gif data file.

* See https://github.com/python/cpython/pull/91461#discussion_r850313336

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
3 years agogh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)
Erlend Egeberg Aasland [Fri, 15 Apr 2022 00:02:56 +0000 (02:02 +0200)] 
gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)

Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
Co-authored-by: palaviv <palaviv@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-91428: include specialized opcodes in _PyOpcode_OpName (GH-91467)
Dennis Sweeney [Thu, 14 Apr 2022 20:00:58 +0000 (16:00 -0400)] 
gh-91428: include specialized opcodes in _PyOpcode_OpName (GH-91467)

3 years agogh-91217: deprecate msilib (GH-91515)
Brett Cannon [Thu, 14 Apr 2022 19:50:11 +0000 (12:50 -0700)] 
gh-91217: deprecate msilib (GH-91515)

3 years agogh-89455: Fix an uninitialized bool in exception print context. (#91466)
Gregory P. Smith [Thu, 14 Apr 2022 18:26:25 +0000 (11:26 -0700)] 
gh-89455: Fix an uninitialized bool in exception print context. (#91466)

Fix an uninitialized bool in exception print context.

`struct exception_print_context.need_close` was uninitialized.

Found by oss-fuzz in a test case running under the undefined behavior sanitizer.

https://oss-fuzz.com/testcase-detail/6217746058182656

```
Python/pythonrun.c:1241:28: runtime error: load of value 253, which is not a valid value for type 'bool'
    #0 0xbf2203 in print_chained cpython3/Python/pythonrun.c:1241:28
    #1 0xbea4bb in print_exception_cause_and_context cpython3/Python/pythonrun.c:1320:19
    #2 0xbea4bb in print_exception_recursive cpython3/Python/pythonrun.c:1470:13
    #3 0xbe9e39 in _PyErr_Display cpython3/Python/pythonrun.c:1517:9
```

Pretty obvious what the ommission was upon code inspection.

3 years agogh-84461: Drop -sWASM, fix building tests for browser (GH-91530)
Christian Heimes [Thu, 14 Apr 2022 14:27:41 +0000 (17:27 +0300)] 
gh-84461: Drop -sWASM, fix building tests for browser (GH-91530)

- drop unnecessary ``=1`` suffix from Emscripten flags
- drop unnecessary ``-sWASM`` flag for side modules
- rename ``build_platform`` to ``build_wasm``. I introduced the target
  for WASM builds a couple of months ago.
- fix ``--enable-test-modules`` for browser builds

3 years agogh-91353: Fix void return type handling in ctypes (GH-32246)
Hood Chatham [Thu, 14 Apr 2022 14:27:01 +0000 (07:27 -0700)] 
gh-91353: Fix void return type handling in ctypes (GH-32246)

3 years agoAdd redirects to Misc/NEWS bpo links (#91454)
Ezio Melotti [Thu, 14 Apr 2022 14:06:01 +0000 (16:06 +0200)] 
Add redirects to Misc/NEWS bpo links (#91454)

3 years agogh-90879: Fix missing parameter for put_nowait() (GH-91514)
slateny [Thu, 14 Apr 2022 08:23:57 +0000 (01:23 -0700)] 
gh-90879: Fix missing parameter for put_nowait() (GH-91514)

3 years agogh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)
Inada Naoki [Thu, 14 Apr 2022 07:00:35 +0000 (16:00 +0900)] 
gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)

3 years agogh-90699: Remove usage of _Py_IDENTIFIER from bisect module. (GH-91522)
Dong-hee Na [Thu, 14 Apr 2022 05:57:25 +0000 (14:57 +0900)] 
gh-90699: Remove usage of _Py_IDENTIFIER from bisect module. (GH-91522)

3 years agogh-90326: Remove quotes for logging config (GH-91516)
slateny [Thu, 14 Apr 2022 04:15:00 +0000 (21:15 -0700)] 
gh-90326: Remove quotes for logging config (GH-91516)

3 years agogh-91266: refactor bytearray strip methods (GH-32096)
Pieter Eendebak [Thu, 14 Apr 2022 02:20:38 +0000 (04:20 +0200)] 
gh-91266: refactor bytearray strip methods (GH-32096)

3 years agogh-87497: Document that urllib.request sends headers in camel case (GH-24661)
Alix Lourme [Thu, 14 Apr 2022 02:19:16 +0000 (04:19 +0200)] 
gh-87497: Document that urllib.request sends headers in camel case (GH-24661)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoFill holes in internal compiler structs (#91458)
L. A. F. Pereira [Wed, 13 Apr 2022 22:09:20 +0000 (15:09 -0700)] 
Fill holes in internal compiler structs (#91458)

3 years agogh-90449: Improve accuracy and readability of exceptions tutorial (GH-31899)
Irit Katriel [Wed, 13 Apr 2022 20:45:33 +0000 (21:45 +0100)] 
gh-90449: Improve accuracy and readability of exceptions tutorial (GH-31899)

3 years agogh-91217: deprecate imghdr (#91461)
Brett Cannon [Wed, 13 Apr 2022 17:47:41 +0000 (10:47 -0700)] 
gh-91217: deprecate imghdr (#91461)

* Deprecate imghdr

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update Doc/whatsnew/3.11.rst

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Inline `imghdr` into `email.mime.image`

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
3 years agogh-91243: Update authors for Required[] and NotRequired[] implementation (GH-91506)
David Foster [Wed, 13 Apr 2022 14:52:19 +0000 (10:52 -0400)] 
gh-91243: Update authors for Required[] and NotRequired[] implementation (GH-91506)

3 years agogh-90971: suppress deprecation warning in `test_lib2to3`(GH-31464)
Nikita Sobolev [Wed, 13 Apr 2022 14:42:25 +0000 (17:42 +0300)] 
gh-90971: suppress deprecation warning in `test_lib2to3`(GH-31464)

Fixes GH-90971

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
3 years agogh-91502: Add a new API to check if a frame is an entry frame (GH-91503)
Pablo Galindo Salgado [Wed, 13 Apr 2022 13:06:56 +0000 (14:06 +0100)] 
gh-91502: Add a new API to check if a frame is an entry frame (GH-91503)

3 years agobpo-43218: Prevent venv creation when the target directory contains a PATH separator...
Dustin Rodrigues [Wed, 13 Apr 2022 08:07:10 +0000 (04:07 -0400)] 
bpo-43218: Prevent venv creation when the target directory contains a PATH separator. (GH-24530)

3 years agobpo-43224: Forbid TypeVar substitution with Unpack (GH-32031)
Serhiy Storchaka [Wed, 13 Apr 2022 03:08:49 +0000 (06:08 +0300)] 
bpo-43224: Forbid TypeVar substitution with Unpack (GH-32031)

3 years agogh-91421: Use constant value check during runtime (GH-91422)
Tobias Stoeckmann [Wed, 13 Apr 2022 03:01:02 +0000 (05:01 +0200)] 
gh-91421: Use constant value check during runtime (GH-91422)

The left-hand side expression of the if-check can be converted to a
constant by the compiler, but the addition on the right-hand side is
performed during runtime.

Move the addition from the right-hand side to the left-hand side by
turning it into a subtraction there. Since the values are known to
be large enough to not turn negative, this is a safe operation.

Prevents a very unlikely integer overflow on 32 bit systems.

Fixes GH-91421.

3 years agogh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)
Jelle Zijlstra [Tue, 12 Apr 2022 19:31:02 +0000 (12:31 -0700)] 
gh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)

I talked to @davidfstr and I offered to implement the runtime part of PEP 655
to make sure we can get it in before the feature freeze. We're going to defer
the documentation to a separate PR, because it can wait until after the feature
freeze.

The runtime implementation conveniently already exists in typing-extensions,
so I largely copied that.

Co-authored-by: David Foster <david@dafoster.net>
3 years agobpo-47152: Automatically regenerate sre_constants.h (GH-91439)
Serhiy Storchaka [Tue, 12 Apr 2022 15:34:06 +0000 (18:34 +0300)] 
bpo-47152: Automatically regenerate sre_constants.h (GH-91439)

* Move the code for generating Modules/_sre/sre_constants.h from
  Lib/re/_constants.py into a separate script
  Tools/scripts/generate_sre_constants.py.
* Add target `regen-sre` in the makefile.
* Make target `regen-all` depending on `regen-sre`.

3 years agogh-90839: Forward gzip.compress() compresslevel to zlib (gh-31215)
Ilya Leoshkevich [Tue, 12 Apr 2022 13:46:40 +0000 (15:46 +0200)] 
gh-90839: Forward gzip.compress() compresslevel to zlib (gh-31215)

3 years agogh-91276: make space for longer opcodes in dis output (GH-91444)
Irit Katriel [Tue, 12 Apr 2022 13:35:56 +0000 (14:35 +0100)] 
gh-91276: make space for longer opcodes in dis output (GH-91444)

3 years agogh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434)
Jack DeVries [Tue, 12 Apr 2022 00:57:52 +0000 (20:57 -0400)] 
gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434)

* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly

3 years agogh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)
Erlend Egeberg Aasland [Tue, 12 Apr 2022 00:55:59 +0000 (02:55 +0200)] 
gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)

3 years agogh-91217: deprecate crypt (GH-91459)
Brett Cannon [Tue, 12 Apr 2022 00:02:19 +0000 (17:02 -0700)] 
gh-91217: deprecate crypt (GH-91459)