]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-96168: Add sqlite3 row factory how-to (GH-99507)
Miss Islington (bot) [Fri, 25 Nov 2022 13:15:09 +0000 (05:15 -0800)] 
gh-96168: Add sqlite3 row factory how-to (GH-99507)

(cherry picked from commit 8749121b07f48994ea47f2e7ff75fb13c13953f6)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2 years agoFix rendering of audioop license in Doc/license.rst (GH-99752)
Miss Islington (bot) [Thu, 24 Nov 2022 16:29:21 +0000 (08:29 -0800)] 
Fix rendering of audioop license in Doc/license.rst (GH-99752)

Also some cosmetic blank line additions for consistency with the
formatting of the rest of the file.
(cherry picked from commit b5b3904f05e77f044f158307bc6bdd2bc1b670a2)

Co-authored-by: Zachary Ware <zach@python.org>
2 years agogh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)
Miss Islington (bot) [Thu, 24 Nov 2022 09:45:40 +0000 (01:45 -0800)] 
gh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)

Issue: GH-98872
(cherry picked from commit 4e5f2db6f228d45a655cf22fd587792d56116145)

Co-authored-by: SQLPATCH <95843853+SQLPATCH@users.noreply.github.com>
Automerge-Triggered-By: GH:kumaraditya303
2 years agoUse faster APIs to calculate paths at startup for Store packaged Python on Windows...
Miss Islington (bot) [Wed, 23 Nov 2022 20:12:34 +0000 (12:12 -0800)] 
Use faster APIs to calculate paths at startup for Store packaged Python on Windows (GH-99345)

(cherry picked from commit 71a4a2da983a651bfcbc1be59c6e27508cdd05c6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection raises...
Dong Uk, Kang [Wed, 23 Nov 2022 18:37:24 +0000 (03:37 +0900)] 
[3.11] gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection raises (GH-95739) (#99721)

Break reference cycles to resolve memory leak, by
removing local exception and future instances from the frame.
(cherry picked from commit 995f6170c78570eca818f7e7dbd8a7661c171a81)

Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
2 years agogh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)
Miss Islington (bot) [Wed, 23 Nov 2022 11:08:22 +0000 (03:08 -0800)] 
gh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)

(cherry picked from commit 5d9183c7ad68eb9ddb53d54a3f9a27e29dbabf31)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agoGH-95283: Add note about compilers in Mac/README.txt (GH-99506)
Miss Islington (bot) [Wed, 23 Nov 2022 11:03:43 +0000 (03:03 -0800)] 
GH-95283: Add note about compilers in Mac/README.txt (GH-99506)

The build machinery assumes that the compiler that's used
to build on macOS includes an SDK that's at least as new
as the OS version on the build machine. Explicitly mention
this in Mac/README.txt.
(cherry picked from commit 8f024a02d7d63315ecc3479f0715e927f48fc91b)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99650 : Updated argparse docs (GH-99653) (GH-99705)
Miss Islington (bot) [Tue, 22 Nov 2022 22:17:20 +0000 (14:17 -0800)] 
[3.11] gh-99650 : Updated argparse docs (GH-99653) (GH-99705)

2 years agoGH-92892: Add section about variadic functions to ctypes documentation (GH-99529)
Miss Islington (bot) [Tue, 22 Nov 2022 18:57:09 +0000 (10:57 -0800)] 
GH-92892: Add section about variadic functions to ctypes documentation (GH-99529)

On some platforms, and in particular macOS/arm64, the calling
convention for variadic arguments is different from the regular
calling convention. Add a section to the documentation to document
this.
(cherry picked from commit bc3a11d21ddef28047b18c0f6a5068fa9fb16da2)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99146 struct module documentation should have more predictable examples...
Miss Islington (bot) [Tue, 22 Nov 2022 18:16:59 +0000 (10:16 -0800)] 
[3.11] gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141) (GH-99702)

gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141)

* nail down a couple examples to have more predictable output

* update a number of things, but this is really just a stash...

* added an applications section to describe typical uses for native and machine-independent formats

* make sure all format strings use a format prefix character

* responding to comments from @gpshead. Not likely finished yet.

* This got more involved than I expected...

* respond to several PR comments
* a lot of wordsmithing
* try and be more consistent in use of ``x`` vs ``'x'``
* expand examples a bit
* update the "see also" to be more up-to-date
* original examples relied on import * so present all examples as if

* reformat based on @gpshead comment (missed before)

* responding to comments

* missed this

* one more suggested edit

* wordsmithing
(cherry picked from commit 22d91c16bb03c3d87f53b5fee10325b876262a78)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2 years ago[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646...
Serhiy Storchaka [Tue, 22 Nov 2022 17:02:56 +0000 (19:02 +0200)] 
[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646) (GH-99698)

Now addClassCleanup() uses separate lists for different TestCase subclasses,
and doClassCleanups() only cleans up the particular class.

(cherry picked from commit c2102136be569e6fc8ed90181f229b46d07142f8)

2 years agogh-93937: Document PyFrame_Check and PyFrame_Type (GH-99695)
Miss Islington (bot) [Tue, 22 Nov 2022 15:50:39 +0000 (07:50 -0800)] 
gh-93937: Document PyFrame_Check and PyFrame_Type (GH-99695)

(cherry picked from commit d15b9f19ac0ffb29b646735d69b29f48a71c247f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years ago[3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693)
Serhiy Storchaka [Tue, 22 Nov 2022 15:46:18 +0000 (17:46 +0200)] 
[3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693)

(cherry picked from commit f520d720f667c87f7b70ed86ea58d73892d6b969)

2 years agoGH-97001: Release GIL in termios extension (GH-99503)
Miss Islington (bot) [Tue, 22 Nov 2022 11:28:06 +0000 (03:28 -0800)] 
GH-97001: Release GIL in termios extension (GH-99503)

Without releasing the GIL calls to termios APIs might block the entire interpreter.
(cherry picked from commit 959ba45d75953caa911e16b4c2a277978fc4b9b0)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years agogh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)
Miss Islington (bot) [Tue, 22 Nov 2022 11:03:26 +0000 (03:03 -0800)] 
gh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)

(cherry picked from commit 1acdfec359fdf3db936168480be0f4157273c200)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2 years agogh-99659: Use correct exceptions in sqlite3 bigmem tests (GH-99660)
Miss Islington (bot) [Tue, 22 Nov 2022 08:51:59 +0000 (00:51 -0800)] 
gh-99659: Use correct exceptions in sqlite3 bigmem tests (GH-99660)

The tests in question were added in 0eec6276fdcd by Serhiy. Apparently,
sqlite3 changed exceptions raised in those cases in the mean time but
the tests never ran because they require a high `-M` setting in the
test runner.
(cherry picked from commit 2781ec9b0e41a62cecc189c22dfc849f9a56927c)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years agogh-99662: fix typo in typing.TypeVarTuple docs (GH-99672)
Miss Islington (bot) [Tue, 22 Nov 2022 04:09:49 +0000 (20:09 -0800)] 
gh-99662: fix typo in typing.TypeVarTuple docs (GH-99672)

(cherry picked from commit 1bf983ce7eb8bfd17dc18102b61dfbdafe0deda2)

Co-authored-by: GabrielAnguita <60579349+GabrielAnguita@users.noreply.github.com>
2 years ago[3.11] gh-99103: Normalize specialized traceback anchors against the current line...
Batuhan Taskaya [Mon, 21 Nov 2022 22:16:12 +0000 (01:16 +0300)] 
[3.11] gh-99103: Normalize specialized traceback anchors against the current line (#99423)

[3.11] gh-99103: Normalize specialized traceback anchors against the current line (GH-99145)

Automerge-Triggered-By: GH:isidentical.
(cherry picked from commit 57be5459593bbd09583317ebdafc4d58ae51dbf4)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2 years agogh-98629: Fixes sys._git and sys.version creation on Windows (GH-99664)
Miss Islington (bot) [Mon, 21 Nov 2022 21:13:52 +0000 (13:13 -0800)] 
gh-98629: Fixes sys._git and sys.version creation on Windows (GH-99664)

(cherry picked from commit 49e554dbafc87245c1364ae00ad064a96f5cb995)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] Revert "[3.11] gh-98724: Fix Py_CLEAR() macro side effects (#99100)" (#99573)
Victor Stinner [Mon, 21 Nov 2022 17:01:10 +0000 (18:01 +0100)] 
[3.11] Revert "[3.11] gh-98724: Fix Py_CLEAR() macro side effects (#99100)" (#99573)

Revert "gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)"

This reverts commit 108289085719db8b227d65ce945e806f91be8f80.

2 years agoAdd more details in test_unittest (GH-99626)
Miss Islington (bot) [Mon, 21 Nov 2022 12:23:09 +0000 (04:23 -0800)] 
Add more details in test_unittest (GH-99626)

(cherry picked from commit 653e563d80fabee8830e0b55f194f82a9beabe70)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-99578: Fix refleak in _imp.create_builtin() (GH-99642)
Miss Islington (bot) [Mon, 21 Nov 2022 11:43:23 +0000 (03:43 -0800)] 
gh-99578: Fix refleak in _imp.create_builtin() (GH-99642)

Fix a reference bug in _imp.create_builtin() after the creation of
the first sub-interpreter for modules "builtins" and "sys".
(cherry picked from commit cb2ef8b2acbb231c207207d3375b2f8b0077a6ee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] GH-95815: Document less specific error for os.remove (GH-99571) (#99641)
Miss Islington (bot) [Mon, 21 Nov 2022 11:04:55 +0000 (03:04 -0800)] 
[3.11] GH-95815: Document less specific error for os.remove (GH-99571) (#99641)

GH-95815: Document less specific error for os.remove (GH-99571)

os.remove can raise PermissionError instead of IsADirectoryError,
when the object to be removed is a directory (in particular on
macOS).

This reverts a change done in GH-14262.
(cherry picked from commit 1cae31d26ba621f6b1f0656ad3d69a0236338bad)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)
Miss Islington (bot) [Mon, 21 Nov 2022 10:22:10 +0000 (02:22 -0800)] 
[3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)

gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470)

Fix a number of compile errors with GCC-12 on macOS:

1. In pylifecycle.c the compile rejects _Pragma within a declaration
2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS
3. _ctypes assumed that __builtin_available is always present on macOS
(cherry picked from commit cdde29dde90947df9bac39c1d19479914fb3db09)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years agogh-99581: Fix a buffer overflow in the tokenizer when copying lines that fill the...
Miss Islington (bot) [Sun, 20 Nov 2022 20:53:02 +0000 (12:53 -0800)] 
gh-99581: Fix a buffer overflow in the tokenizer when copying lines that fill the available buffer (GH-99605)

(cherry picked from commit e13d1d9dda8c27691180bc618bd5e9bf43dfa89f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.11] gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215...
Lysandros Nikolaou [Sun, 20 Nov 2022 18:29:05 +0000 (19:29 +0100)] 
[3.11] gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215) (GH-99622)

gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215)

(cherry picked from commit 9c4232ae8972a33f84e875cfdd866318a1233e47)

2 years ago[3.11] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode...
Serhiy Storchaka [Sun, 20 Nov 2022 09:24:45 +0000 (11:24 +0200)] 
[3.11] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH-99431). (GH-99614)

(cherry picked from commit 06d4e02c3b3526b5d90e41a0a0befa8663e08f27)

2 years agoDoc: Make functions.html readable again. (GH-99476)
Miss Islington (bot) [Sat, 19 Nov 2022 10:58:32 +0000 (02:58 -0800)] 
Doc: Make functions.html readable again. (GH-99476)

(cherry picked from commit 858cb79486b504b2645c1ee3bfdca4f386bcb7d7)

Co-authored-by: Julien Palard <julien@palard.fr>
2 years ago[3.11] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (#99365)
Miss Islington (bot) [Sat, 19 Nov 2022 10:10:42 +0000 (02:10 -0800)] 
[3.11] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (#99365)

gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095)
(cherry picked from commit 67b4d2772c5124b908f8ed9b13166a79bbeb88d2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoDoc: Replace question mark with fullstop (GH-99558)
Miss Islington (bot) [Fri, 18 Nov 2022 19:34:10 +0000 (11:34 -0800)] 
Doc: Replace question mark with fullstop (GH-99558)

The sentence "Set the LC_CTYPE locale to the user preferred locale." should end with a period
instead of a question mark.
(cherry picked from commit 0e09d2cc59cad61ad6a7a79aade52e9a2cfa7b34)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2 years agogh-99442: Fix handling in py.exe launcher when argv[0] does not include a file extens...
Miss Islington (bot) [Fri, 18 Nov 2022 17:49:14 +0000 (09:49 -0800)] 
gh-99442: Fix handling in py.exe launcher when argv[0] does not include a file extension (GH-99542)

(cherry picked from commit a220c6d1ee3053895f502b43b47dc3a9c55fa6a3)

2 years agogh-99553: fix bug where an ExceptionGroup subclass can wrap a BaseException (GH-99572)
Miss Islington (bot) [Fri, 18 Nov 2022 16:10:55 +0000 (08:10 -0800)] 
gh-99553: fix bug where an ExceptionGroup subclass can wrap a BaseException (GH-99572)

(cherry picked from commit c8c6113398ee9a7867fe9b08bc539cceb61e2aaa)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agogh-99443: `descr_set_trampoline_call` return type should be `int` not `PyObject*...
Miss Islington (bot) [Wed, 16 Nov 2022 23:50:50 +0000 (15:50 -0800)] 
gh-99443: `descr_set_trampoline_call` return type should be `int` not `PyObject*` (GH-99444)

(cherry picked from commit bc390dd93574c3c6773958c6a7e68adc83d0bf3f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2 years agogh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523)
Miss Islington (bot) [Wed, 16 Nov 2022 23:41:18 +0000 (15:41 -0800)] 
gh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523)

(cherry picked from commit 7c57857340befcb90394bc347c904ca62049b684)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code...
Hood Chatham [Wed, 16 Nov 2022 16:09:34 +0000 (08:09 -0800)] 
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (gh-99461) (#99514)

Manual backport of GH-99461.

2 years agogh-98940: Fix Mac/Extras.install.py File filter bug (GH-98943)
Miss Islington (bot) [Wed, 16 Nov 2022 09:45:31 +0000 (01:45 -0800)] 
gh-98940: Fix Mac/Extras.install.py File filter bug (GH-98943)

Slightly simplify the script and fix a case issue in the name of ``.DS_Store`` files.

(cherry picked from commit ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c)

Co-authored-by: zhangbo <zhangbo2012@outlook.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agogh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc...
Miss Islington (bot) [Tue, 15 Nov 2022 21:10:27 +0000 (13:10 -0800)] 
gh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (GH-99373)

(cherry picked from commit 4e4b13e8f6211abbc0d53056da11357756daa314)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years agoGH-98219: reduce sleep time in `asyncio` subprocess test (GH-99464)
Miss Islington (bot) [Tue, 15 Nov 2022 15:52:38 +0000 (07:52 -0800)] 
GH-98219: reduce sleep time in `asyncio` subprocess test (GH-99464)

(cherry picked from commit 619cadcda6a8ba4a038c1807b6566a90e25db934)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years agogh-99370: fix test_zippath_from_non_installed_posix (GH-99483)
Miss Islington (bot) [Tue, 15 Nov 2022 01:27:42 +0000 (17:27 -0800)] 
gh-99370: fix test_zippath_from_non_installed_posix (GH-99483)

When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.
(cherry picked from commit 1df0752b4d49103654abbc75c06b4dc0cf99de1c)

Co-authored-by: Kai Zhang <kylerzhang11@gmail.com>
2 years ago[3.11] gh-99357: Close the event loop when it is no longer used in test_uncancel_stru...
Miss Islington (bot) [Mon, 14 Nov 2022 18:52:10 +0000 (10:52 -0800)] 
[3.11] gh-99357: Close the event loop when it is no longer used in test_uncancel_structured_blocks (GH-99414) (#99424)

(cherry picked from commit 99972dc7450f1266e39202012827f4f3c995b0ca)

Co-authored-by: Xiao Chen <chenxiao_7@163.com>
2 years agogh-99370: Calculate zip path from prefix when in a venv (GH-99371)
Miss Islington (bot) [Mon, 14 Nov 2022 15:31:46 +0000 (07:31 -0800)] 
gh-99370: Calculate zip path from prefix when in a venv (GH-99371)

Before python3.11, when in a venv the zip path is calculated
from prefix on POSIX platforms. In python3.11 the behavior is
accidentally changed to calculating from default prefix. This
change will break venv created from a non-installed python
with a stdlib zip file. This commit restores the behavior back
to before python3.11.
(cherry picked from commit e3d4fed07429670af631e5662086b76c1ec098c4)

Co-authored-by: Kai Zhang <kylerzhang11@gmail.com>
2 years ago[Enum] update version TODO comment (GH-99458)
Miss Islington (bot) [Mon, 14 Nov 2022 05:18:13 +0000 (21:18 -0800)] 
[Enum] update version TODO comment (GH-99458)

(cherry picked from commit db115682bd639a2642c617f0b7d5b30cd7d7f472)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 years ago[3.11] gh-98930: improve the docstring of signal.strsignal (GH-99290) (#99449)
Gregory P. Smith [Sun, 13 Nov 2022 20:21:19 +0000 (12:21 -0800)] 
[3.11] gh-98930: improve the docstring of signal.strsignal (GH-99290) (#99449)

Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError.

Closes GH-98930

Co-authored-by: Gregory P. Smith <greg@krypto.org>.
(cherry picked from commit 88385b856490a5ce3c99160bde6050638f81f72e)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2 years agogh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)
Miss Islington (bot) [Sun, 13 Nov 2022 19:51:26 +0000 (11:51 -0800)] 
gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)

(cherry picked from commit 343eb0f94b26f2a4c1c15505d417e8157ec19660)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agogh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabe...
Miss Islington (bot) [Sun, 13 Nov 2022 19:00:25 +0000 (11:00 -0800)] 
gh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabetical ASCII character. (GH-99421)

Prevent urllib.parse.urlparse from accepting schemes that don't begin with an alphabetical ASCII character.

RFC 3986 defines a scheme like this: `scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`
RFC 2234 defines an ALPHA like this: `ALPHA = %x41-5A / %x61-7A`

The WHATWG URL spec defines a scheme like this:
`"A URL-scheme string must be one ASCII alpha, followed by zero or more of ASCII alphanumeric, U+002B (+), U+002D (-), and U+002E (.)."`
(cherry picked from commit 439b9cfaf43080e91c4ad69f312f21fa098befc7)

Co-authored-by: Ben Kallus <49924171+kenballus@users.noreply.github.com>
2 years ago[3.11] gh-98707: configure --with-system-libmpdec and --with-system-expat no longer...
Erlend E. Aasland [Sun, 13 Nov 2022 18:47:31 +0000 (19:47 +0100)] 
[3.11] gh-98707: configure --with-system-libmpdec and --with-system-expat no longer include vendored headers (GH-98711) (#99391)

(cherry picked from commit 6abec1caffdba2e282b14fe57c6ce61974de4bbe)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2 years agogh-99392: Fix sqlite3 converter recipes (GH-99393)
Miss Islington (bot) [Sat, 12 Nov 2022 19:48:52 +0000 (11:48 -0800)] 
gh-99392: Fix sqlite3 converter recipes (GH-99393)

(cherry picked from commit dfc1b17a23fed933cffa09eec125a7e8c90ea867)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2 years ago[3.11] gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395) (GH-99415)
Miss Islington (bot) [Sat, 12 Nov 2022 18:43:32 +0000 (10:43 -0800)] 
[3.11] gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395) (GH-99415)

gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)
(cherry picked from commit 73a921b0701a4c135154c14649b49a0bb797e143)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agobpo-34272: Reorganize C API tests. (GH-8551)
Miss Islington (bot) [Sat, 12 Nov 2022 17:36:42 +0000 (09:36 -0800)] 
bpo-34272: Reorganize C API tests. (GH-8551)

Move some C API tests into Lib/test/test_capi/.
(cherry picked from commit f883b7f8ee3209b52863fc662343c8cd81abdc59)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-80448: argparse: Fix IndexError on store_true action (GH-15656)
Miss Islington (bot) [Sat, 12 Nov 2022 02:30:38 +0000 (18:30 -0800)] 
gh-80448: argparse: Fix IndexError on store_true action (GH-15656)

(cherry picked from commit e02cc6d42aee1f0a9ee629f76576eee478224d9d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)
Miss Islington (bot) [Fri, 11 Nov 2022 13:42:44 +0000 (05:42 -0800)] 
gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)

(cherry picked from commit c3c3871415c86088d45abcf73ccd2c2b09dc5772)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years ago[3.11] GH-99298: Don't perform jumps before error handling (GH-99343)
Brandt Bucher [Fri, 11 Nov 2022 11:30:21 +0000 (03:30 -0800)] 
[3.11] GH-99298: Don't perform jumps before error handling (GH-99343)

3 years agogh-84522: Add for-loop to apply-method-to-sequence FAQ (GH-94660)
Miss Islington (bot) [Fri, 11 Nov 2022 04:26:31 +0000 (20:26 -0800)] 
gh-84522: Add for-loop to apply-method-to-sequence FAQ (GH-94660)

(cherry picked from commit 97c493dd3543c7c3bb5319587c162f46271d4c5d)

Co-authored-by: Samuel Sloniker <sam@kj7rrv.com>
3 years agogh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)
Miss Islington (bot) [Fri, 11 Nov 2022 01:30:50 +0000 (17:30 -0800)] 
gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)

fix(doc-tools): use sphinx.locale._ as gettext() for backward-compatibility in pyspecific.py

[why] spinix 5.3 changed locale.translators from a defaultdict(gettext.NullTranslations) to a dict, which leads to failure of pyspecific.py. Use sphinx.locale._ as gettext to fix the issue.
(cherry picked from commit d26ee8a0a552de111b8245ef0de63e3f3f535d9f)

Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
3 years agoGH-99183: Document behavior of count() for empty substrings (GH-99339)
Miss Islington (bot) [Thu, 10 Nov 2022 21:29:16 +0000 (13:29 -0800)] 
GH-99183: Document behavior of count() for empty substrings (GH-99339)

(cherry picked from commit 2f4af2d99cffed6ba81e4b8fd886de6ae8625a3f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
3 years ago[3.11] gh-99277: remove older version of `get_write_buffer_limits` (GH-99280) (#99338)
Miss Islington (bot) [Thu, 10 Nov 2022 17:01:14 +0000 (09:01 -0800)] 
[3.11] gh-99277: remove older version of `get_write_buffer_limits` (GH-99280) (#99338)

(cherry picked from commit f1680c3fbf7d18a1b3a5b390c433298bb6b9fcac)

Co-authored-by: Carlo <34414634+csuriano23@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)
Miss Islington (bot) [Thu, 10 Nov 2022 16:53:51 +0000 (08:53 -0800)] 
gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)

Check to see if `base_executable` exists. If it does not, attempt
to use known alternative names of the python binary to find an
executable in the path specified by `home`.

If no alternative is found, previous behavior is preserved.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
(cherry picked from commit c41b13d39ccc2d6e239782de99ba8e3cdd061e5a)

Co-authored-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
3 years ago[3.11] GH-99257: Check the owner's type when specializing slots (GH-99324)
Miss Islington (bot) [Thu, 10 Nov 2022 16:44:49 +0000 (08:44 -0800)] 
[3.11] GH-99257: Check the owner's type when specializing slots (GH-99324)

(cherry picked from commit 9d692841691590c25e6cf5b2250a594d3bf54825)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
3 years agogh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)
Miss Islington (bot) [Thu, 10 Nov 2022 12:58:06 +0000 (04:58 -0800)] 
gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)

(cherry picked from commit dbf2faf579b4094387d65ee41f049456ca67c446)

Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
3 years agogh-99320: remove tests for old-style class from `test_complex` (GH-99321)
Miss Islington (bot) [Thu, 10 Nov 2022 11:22:00 +0000 (03:22 -0800)] 
gh-99320: remove tests for old-style class from `test_complex` (GH-99321)

(cherry picked from commit 26726c76494d85c7b565b764c732dd4473458409)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoGH-99205: Mark new interpreters and threads as non-static (GH-99268)
Miss Islington (bot) [Wed, 9 Nov 2022 22:19:15 +0000 (14:19 -0800)] 
GH-99205: Mark new interpreters and threads as non-static (GH-99268)

(cherry picked from commit 283ab0e1c002f2d7459d581df6b4b8599e7d1a4d)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
3 years agoUpdate reference to the size of PyPI (GH-99076)
Miss Islington (bot) [Wed, 9 Nov 2022 19:36:10 +0000 (11:36 -0800)] 
Update reference to the size of PyPI (GH-99076)

Update reference to the size of PyPI

Last changed in 2008 (528576031d9655ca8004260a2bf2c783f77d1da1).
(cherry picked from commit 58ee5d8677fbd4c6c58b7a78117835bccede6bcd)

Co-authored-by: jmcb <joelsgp@protonmail.com>
3 years agogh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)
Victor Stinner [Wed, 9 Nov 2022 15:29:23 +0000 (16:29 +0100)] 
gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)

The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their argument once. If an argument has side effects, these side
effects are no longer duplicated.

Add test_py_clear() and test_py_setref() unit tests to _testcapi.

(cherry picked from commit c03e05c2e72f3ea5e797389e7d1042eef85ad37a)

3 years ago[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)
Miss Islington (bot) [Wed, 9 Nov 2022 00:51:04 +0000 (16:51 -0800)] 
[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)

(cherry picked from commit b3bd69c1bfb431fe75cc301f97494f9f98df2a19)

Co-authored-by: Bruno Neyra <112962296+blv-brunoneyra@users.noreply.github.com>
3 years agogh-94445: add compiler test for another case of excessive stack use (GH-99237)
Miss Islington (bot) [Tue, 8 Nov 2022 21:16:28 +0000 (13:16 -0800)] 
gh-94445: add compiler test for another case of excessive stack use (GH-99237)

(cherry picked from commit 027bc7e6bba93777c80300953579266818d339e7)

Co-authored-by: Carl Meyer <carl@oddbird.net>
3 years agogh-99238: clarify the type of the env dict. (GH-99253)
Miss Islington (bot) [Tue, 8 Nov 2022 21:09:04 +0000 (13:09 -0800)] 
gh-99238: clarify the type of the env dict. (GH-99253)

(cherry picked from commit 2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agogh-99248: [Enum] fix negative number infinite loop (GH-99256)
Miss Islington (bot) [Tue, 8 Nov 2022 20:33:21 +0000 (12:33 -0800)] 
gh-99248: [Enum] fix negative number infinite loop (GH-99256)

[Enum] fix negative number infinite loop

- _iter_bits_lsb() now raises a ValueError if a negative number
  is passed in

- verify() now skips checking negative numbers for named flags
(cherry picked from commit 0b4ffb08ccdc21fc07ce90d3f78b58a25e1af653)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
3 years agoFix broken link in `asyncio-subprocesses` doc (GH-99214)
Miss Islington (bot) [Tue, 8 Nov 2022 16:33:51 +0000 (08:33 -0800)] 
Fix broken link in `asyncio-subprocesses` doc (GH-99214)

GH- Fix broken link in Doc/library/asyncio-subprocess.rst

This is a trivial fix in documentation to fix a broken link.

There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.htmlGH-asyncio.subprocess.Process) for the function ``wait_for``:

![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png)

I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs.

This PR fixes the link and the result looks like the following:

![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png)
(cherry picked from commit acf4d5d5bdecbc8756276731e09bae245d88518d)

Co-authored-by: Mikael Koli <koli.mikael@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
3 years agogh-99181: fix except* on unhashable exceptions (GH-99192)
Miss Islington (bot) [Tue, 8 Nov 2022 09:58:45 +0000 (01:58 -0800)] 
gh-99181: fix except* on unhashable exceptions (GH-99192)

(cherry picked from commit c43714fbcdb9bb0927872d6ebf5697edd2e2a1e9)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agogh-92119: ctypes: Print exception class name instead of its representation (GH-98302)
Miss Islington (bot) [Tue, 8 Nov 2022 05:20:06 +0000 (21:20 -0800)] 
gh-92119: ctypes: Print exception class name instead of its representation (GH-98302)

(cherry picked from commit b9dedfe61dce2997e3e6be318d8c50b0c19c9394)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
3 years ago[3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (#99222)
Miss Islington (bot) [Tue, 8 Nov 2022 02:57:10 +0000 (18:57 -0800)] 
[3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (#99222)

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years ago[3.11] gh-98513: Test abstract methods of some `collections` types (GH-98516) (#99226)
Miss Islington (bot) [Tue, 8 Nov 2022 02:45:08 +0000 (18:45 -0800)] 
[3.11] gh-98513: Test abstract methods of some `collections` types (GH-98516) (#99226)

(cherry picked from commit a309ad9f76db4ab9a8f933ab1ffea78ecaca827f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-99124: use concrete exception types in `test_builtin` (GH-99125)
Miss Islington (bot) [Tue, 8 Nov 2022 02:12:48 +0000 (18:12 -0800)] 
gh-99124: use concrete exception types in `test_builtin` (GH-99125)

(cherry picked from commit c32bc1bffd9d63ede0d0505abab983247a3ad0c6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)
Miss Islington (bot) [Mon, 7 Nov 2022 21:12:56 +0000 (13:12 -0800)] 
gh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)

(cherry picked from commit acc6468f7ee0d1f22633f0b84df28f69e75f1260)

Co-authored-by: Shixian Li <34830785+znsoooo@users.noreply.github.com>
3 years ago[3.11] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH...
Miss Islington (bot) [Mon, 7 Nov 2022 18:55:58 +0000 (10:55 -0800)] 
[3.11] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002) (GH-99212)

gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)

The flag is not inherited, but its effect -- a NULL tp_new -- is.

Drop hints for people who come here wanting to “disallow instantiation”.
(cherry picked from commit 1438b779971605e516bd0a4051a704d6ffbbd58d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 years agodoc: Formatting and typo fixes (GH-98974)
Miss Islington (bot) [Mon, 7 Nov 2022 17:14:52 +0000 (09:14 -0800)] 
doc: Formatting and typo fixes (GH-98974)

(cherry picked from commit 728e42fcf51cbb2108caf1382df224c13b53d024)

Co-authored-by: jmcb <joelsgp@protonmail.com>
3 years agobpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
Miss Islington (bot) [Mon, 7 Nov 2022 12:11:11 +0000 (04:11 -0800)] 
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)

(cherry picked from commit 5ff81da6d3a8eb01fc5500fd1c9eaa6543286301)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
3 years ago[3.11] gh-99153: set location on SyntaxError for try with both except and except...
Irit Katriel [Mon, 7 Nov 2022 09:41:20 +0000 (09:41 +0000)] 
[3.11] gh-99153: set location on SyntaxError for try with both except and except* (GH-99160) (#99168)

3 years ago[3.11] GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156). ...
Nikita Sobolev [Mon, 7 Nov 2022 09:41:08 +0000 (12:41 +0300)] 
[3.11] GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156). (GH-99188)

(cherry picked from commit d7a00f1e8eee05fc5ae97ea1ef0615feefce887b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Automerge-Triggered-By: GH:rhettinger
3 years agogh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
Miss Islington (bot) [Mon, 7 Nov 2022 02:45:54 +0000 (18:45 -0800)] 
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)

(cherry picked from commit f626b7b504df454d289527a4f922b09deeae9e21)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agogh-94286 Fix documentation of print default param (GH-94297)
Miss Islington (bot) [Sun, 6 Nov 2022 20:24:02 +0000 (12:24 -0800)] 
gh-94286 Fix documentation of print default param (GH-94297)

(cherry picked from commit 2db55e0c0069a928775fa819973a76f840c5ab5a)

Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
3 years agogh-99051: remove duplicated test from `test_weakref` (GH-99052)
Miss Islington (bot) [Sun, 6 Nov 2022 20:03:15 +0000 (12:03 -0800)] 
gh-99051: remove duplicated test from `test_weakref` (GH-99052)

(cherry picked from commit 8463cb55dabb78571e32d8c8c7de8679ab421c2c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-83004: Clean up refleak in _pickle initialisation (GH-98841)
Miss Islington (bot) [Sun, 6 Nov 2022 14:41:24 +0000 (06:41 -0800)] 
gh-83004: Clean up refleak in _pickle initialisation (GH-98841)

(cherry picked from commit d3b82b4463c4eb51954c0afd98342f0c5e479baa)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)
Miss Islington (bot) [Sun, 6 Nov 2022 14:30:41 +0000 (06:30 -0800)] 
gh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)

(cherry picked from commit 31f2f6568d89564cc1d686cd6b75ba5578aaa748)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)
Miss Islington (bot) [Sun, 6 Nov 2022 14:30:32 +0000 (06:30 -0800)] 
gh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)

* fix auto() failure during multiple assignment

i.e. `ONE = auto(), 'text'` will now have `ONE' with the value of `(1,
'text')`.  Before it would have been `(<an auto instance>, 'text')`
(cherry picked from commit 8feb7ab77c80968a6de6079299a39b0494b1701b)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
3 years agogh-83004: Clean up refleak in _io initialisation (GH-98840)
Miss Islington (bot) [Sun, 6 Nov 2022 14:03:52 +0000 (06:03 -0800)] 
gh-83004: Clean up refleak in _io initialisation (GH-98840)

(cherry picked from commit 1208037246eeab4c5c003f1651edfefb045e6fb7)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years ago`test_typing`: use all pickle protocols (GH-99154)
Miss Islington (bot) [Sun, 6 Nov 2022 12:15:45 +0000 (04:15 -0800)] 
`test_typing`: use all pickle protocols (GH-99154)

(cherry picked from commit a0bc75e2fdd53680cb147881bcb3754bd56aa2fa)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[doc] fix typo (GH-99143)
Miss Islington (bot) [Sat, 5 Nov 2022 21:12:22 +0000 (14:12 -0700)] 
[doc] fix typo (GH-99143)

(cherry picked from commit 586b07e1f9f15825e6564df031744fe812b28655)

Co-authored-by: Doj <34577424+visualdoj@users.noreply.github.com>
3 years agogh-99134: Update bundled pip to 22.3.1 (gh-99135)
Miss Islington (bot) [Sat, 5 Nov 2022 19:27:23 +0000 (12:27 -0700)] 
gh-99134: Update bundled pip to 22.3.1 (gh-99135)

Update bundled pip to 22.3.1
(cherry picked from commit 47ab8480e71ab3949a336a94c7fd146b1fce595d)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
3 years agogh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)
Miss Islington (bot) [Sat, 5 Nov 2022 17:32:46 +0000 (10:32 -0700)] 
gh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)

(cherry picked from commit c5c40773cbadc8c35212877ea315a375f3bfaa4b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.11] gh-98706: Sync with importlib_metadata 4.13.0. (GH-98875)
Jason R. Coombs [Sat, 5 Nov 2022 13:55:04 +0000 (09:55 -0400)] 
[3.11] gh-98706: Sync with importlib_metadata 4.13.0. (GH-98875)

These changes are already applied to main but have been selected from importlib_metadata 4.x for their bug fixes.

3 years agogh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)
Miss Islington (bot) [Sat, 5 Nov 2022 13:32:46 +0000 (06:32 -0700)] 
gh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)

(cherry picked from commit b5f711185bd11819566068ddf2a74a1402340e2d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.11] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCO...
Erlend E. Aasland [Sat, 5 Nov 2022 09:27:47 +0000 (10:27 +0100)] 
[3.11] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99118)

(cherry picked from commit 12078e78f6e4a21f344e4eaff529e1ff3b97734f)

Co-authored-by: Sam James <sam@cmpct.info>
3 years ago[3.11] gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071) (#99098)
Victor Stinner [Fri, 4 Nov 2022 14:50:51 +0000 (15:50 +0100)] 
[3.11] gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071) (#99098)

The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT.  It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".

(cherry picked from commit f09da28768b77713566e932e912f107b6b57e8fd)

3 years agominor edits to locale doc (GH-98537)
Miss Islington (bot) [Fri, 4 Nov 2022 13:12:01 +0000 (06:12 -0700)] 
minor edits to locale doc (GH-98537)

(cherry picked from commit c0bf7607a1c215cd92f2976c9e915b913fc149d1)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
3 years ago[3.11] gh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767) (GH-99091)
Miss Islington (bot) [Fri, 4 Nov 2022 11:12:42 +0000 (04:12 -0700)] 
[3.11] gh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes (GH-96767) (GH-99091)

3 years agoDocs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (GH-99078)
Miss Islington (bot) [Thu, 3 Nov 2022 23:27:53 +0000 (16:27 -0700)] 
Docs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (GH-99078)

(cherry picked from commit 016c7d37b6acfe2203542a2655080c6402b3be1f)

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
3 years agogh-98978: Fix Py_SetPythonHome(NULL) (GH-99066)
Miss Islington (bot) [Thu, 3 Nov 2022 18:09:15 +0000 (11:09 -0700)] 
gh-98978: Fix Py_SetPythonHome(NULL) (GH-99066)

Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL)
and _Py_SetProgramFullPath(NULL) function calls.

Issue reported by Benedikt Reinartz.
(cherry picked from commit b07f546ea3a574bc3016fb023c157c65a47f4849)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-98740: Fix validation of conditional expressions in RE (GH-98764)
Miss Islington (bot) [Thu, 3 Nov 2022 07:47:39 +0000 (00:47 -0700)] 
gh-98740: Fix validation of conditional expressions in RE (GH-98764)

In very rare circumstances the JUMP opcode could be confused with the
argument of the opcode in the "then" part which doesn't end with the
JUMP opcode. This led to incorrect detection of the final JUMP opcode
and incorrect calculation of the size of the subexpression.

NOTE: Changed return value of functions _validate_inner() and
_validate_charset() in Modules/_sre/sre.c.  Now they return 0 on success,
-1 on failure, and 1 if the last op is JUMP (which usually is a failure).
Previously they returned 1 on success and 0 on failure.
(cherry picked from commit e9ac890c0273aee413aa528cc202c3efa29f1d7a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-98512: Add more tests for `ValuesView` (GH-98515)
Miss Islington (bot) [Thu, 3 Nov 2022 02:35:39 +0000 (19:35 -0700)] 
gh-98512: Add more tests for `ValuesView` (GH-98515)

(cherry picked from commit 29e027c3e6535aa1c0eacc2fb2002c53405e1f6f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>