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

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:

(cherry picked from commit
acf4d5d5bdecbc8756276731e09bae245d88518d )
Co-authored-by: Mikael Koli <koli.mikael@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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 )
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>
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)
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>
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>
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>
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>
Miss Islington (bot) [Thu, 3 Nov 2022 02:24:24 +0000 (19:24 -0700)]
gh-65002: Make note that null bytes are used to pad bytes (GH-98635)
(cherry picked from commit
8cd21c2c5d34a5c5e857782da58d773f29ff8821 )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Miss Islington (bot) [Thu, 3 Nov 2022 02:22:41 +0000 (19:22 -0700)]
Docs: Add 'as, match statement' to the index (GH-99001)
(cherry picked from commit
26720fffd090929fd2058b73e5970cc520b30aef )
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Thu, 3 Nov 2022 02:17:33 +0000 (19:17 -0700)]
argparse howto: Use f-string in preference to "...".format() (GH-98883)
(cherry picked from commit
1fd20d0b57478d8b0d8d58718fa773135348bf98 )
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Miss Islington (bot) [Wed, 2 Nov 2022 21:57:26 +0000 (14:57 -0700)]
gh-96997: Clarify the contract of PyMem_SetAllocator() (GH-98977)
(cherry picked from commit
c053284e3930027847d5adf99efcb1aa5ccbacd1 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Steve Dower [Wed, 2 Nov 2022 20:04:06 +0000 (20:04 +0000)]
gh-98790: When DLLs directory is missing on Windows, assume executable_dir contains PYD files instead (GH-98936)
Miss Islington (bot) [Wed, 2 Nov 2022 19:58:48 +0000 (12:58 -0700)]
gh-97731: Specify the full path to the docs for `make docclean` (GH-98982)
Specify the full path to the docs for `make docclean`
This is to have `make clean` not error out on cross-builds.
(cherry picked from commit
22bab74c8f5fa6d53ddb7e40baa4334d09331c0f )
Co-authored-by: Brett Cannon <brett@python.org>
Miss Islington (bot) [Wed, 2 Nov 2022 19:12:31 +0000 (12:12 -0700)]
gh-98415: Fix uuid.getnode() ifconfig implementation (GH-98423)
The uuid.getnode() function has multiple implementations, tested sequentially.
The ifconfig implementation was incorrect and always failed: fix it.
In practice, functions of libuuid library are preferred, if available:
uuid_generate_time_safe(), uuid_create() or uuid_generate_time().
(cherry picked from commit
e3ec272f57c3948834a6159cf2604978d3db67a0 )
Co-authored-by: Chaim Sanders <csanders-git@users.noreply.github.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Miss Islington (bot) [Wed, 2 Nov 2022 05:12:52 +0000 (22:12 -0700)]
gh-92679: Clarify asyncio.loop.start_tls parameters (GH-92682)
(cherry picked from commit
898d0d9ad8328326ba5f7df9952e9dc287766ca3 )
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Miss Islington (bot) [Wed, 2 Nov 2022 05:06:26 +0000 (22:06 -0700)]
gh-96265: Formatting changes for faq/programming (GH-98242)
* Formatting changes for faq/programming
* Add missing method formatting, use non-literal formatting
* Fix sphinx warnings
* Some extra formatting missed earlier
* More formatting suggestions from review
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Add missing colon, avoid referening external module
(cherry picked from commit
0689b99bb8c4f6058af43a52effaa8a25609dbed )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Wed, 2 Nov 2022 04:00:13 +0000 (21:00 -0700)]
gh-92871: Postpone the removal of typing.{io,re} to 3.13 (GH-98958)
(cherry picked from commit
65d1407737befc3e9430eda8ae14ab1c7f9d8c7a )
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Miss Islington (bot) [Tue, 1 Nov 2022 23:34:32 +0000 (16:34 -0700)]
[3.11] [doc] Update cookbook example for socket-based logging in a production sett… (GH-98922) (GH-98980)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Tue, 1 Nov 2022 23:18:55 +0000 (16:18 -0700)]
[3.11] gh-98925: Lower marshal recursion depth for WASI (GH-98938) (GH-98979)
* gh-98925: Lower marshal recursion depth for WASI (GH-98938)
For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack.
As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
(cherry picked from commit
9711265182f163ba381e7800e3748ac28710f9ef )
Co-authored-by: Brett Cannon <brett@python.org>
Miss Islington (bot) [Tue, 1 Nov 2022 18:30:54 +0000 (11:30 -0700)]
gh-98689: Update Windows builds to zlib v1.2.13 (GH-98968)
(cherry picked from commit
c0859743d9ad3bbd4c021200f4162cfeadc0c17a )
Co-authored-by: Zachary Ware <zach@python.org>
Miss Islington (bot) [Tue, 1 Nov 2022 13:35:34 +0000 (06:35 -0700)]
Doc: use "unnumbered" footnotes (GH-98954)
Use unnumbered footnote in this file to avoid reseting the footnotes numbering.
Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.
(cherry picked from commit
f042646595d1cdd2ecdc15222b1766f746d010f0 )
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Miss Islington (bot) [Tue, 1 Nov 2022 11:08:26 +0000 (04:08 -0700)]
[3.11] Missing PS1 prompt in tutorial example (GH-98921) (GH-98944)
(cherry picked from commit
d22bde983e58eaff9773f32a8324ddf9074e95e1 )
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Automerge-Triggered-By: GH:rhettinger
Miss Islington (bot) [Tue, 1 Nov 2022 08:01:28 +0000 (01:01 -0700)]
gh-98852: Fix subscription of type aliases (GH-98920)
Fix subscription of type aliases containing bare generic types or types
like TypeVar: for example tuple[A, T][int] and tuple[TypeVar, T][int],
where A is a generic type, and T is a type variable.
(cherry picked from commit
0e15c31c7e9907fdbe38a3f419b669fed5bb3b33 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 1 Nov 2022 02:57:42 +0000 (19:57 -0700)]
Fix wording in Functional Programming HOWTO (GH-98939)
(cherry picked from commit
f4d56292e943e822abf68f3c210ccf6b88c587ac )
Co-authored-by: partev <petrosyan@gmail.com>
Miss Islington (bot) [Tue, 1 Nov 2022 02:40:30 +0000 (19:40 -0700)]
GH-98897: fix memory leak if `math.dist` raises exception (GH-98898)
(cherry picked from commit
ab575050709e2b313ca9a9585f09b6f4b0560318 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Mon, 31 Oct 2022 21:31:26 +0000 (14:31 -0700)]
gh-98692: Enable treating shebang lines as executables in py.exe launcher (GH-98732)
(cherry picked from commit
88297e2a8a75898228360ee369628a4a6111e2ee )
Co-authored-by: Steve Dower <steve.dower@python.org>
Charlie Zhao [Mon, 31 Oct 2022 18:21:01 +0000 (02:21 +0800)]
[3.11] gh-98793: Fix typecheck in `overlapped.c` (GH-98835) (#98889)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit
3ac8c0ab6ee819a14b1c8e0992acbaf376a46058 )
Miss Islington (bot) [Mon, 31 Oct 2022 18:07:14 +0000 (11:07 -0700)]
Fix typo in sorting HOWTO (GH-98888)
(cherry picked from commit
3b86538661038ee23d0be80bb7593e2e7856f059 )
Co-authored-by: partev <petrosyan@gmail.com>
Miss Islington (bot) [Mon, 31 Oct 2022 17:29:30 +0000 (10:29 -0700)]
Doc: Fix sphinx-lint issues (GH-98911)
They were introduced right between GH-98441 and GH-98408.
(cherry picked from commit
c1c3be0f9dc414bfae9a5718451ca217751ac687 )
Co-authored-by: Julien Palard <julien@palard.fr>
Miss Islington (bot) [Mon, 31 Oct 2022 15:14:04 +0000 (08:14 -0700)]
gh-98576: Fix types in dataclass.InitVar example (gh-98577)
(cherry picked from commit
880bafc574bcd811dd7244f9a82056430b489996 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Mon, 31 Oct 2022 14:59:00 +0000 (07:59 -0700)]
[3.11] gh-96151: Use a private name for passing builtins to dataclass. This now allows for a field named BUILTIN (gh-98143) (gh-98900)
gh-96151: Use a private name for passing builtins to dataclass. This now allows for a field named BUILTIN (gh-98143)
(cherry picked from commit
29f98b46b77ee528477b9a7b335974b9682f7f14 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 30 Oct 2022 23:15:12 +0000 (16:15 -0700)]
[3.11] gh-96853: Restore test coverage for Py_Initialize(Ex) (GH-98874)
* As most of `test_embed` now uses `Py_InitializeFromConfig`, add
a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`)
* Rename `_testembed` init helper to clarify the API used
* Add a `PyConfig_Clear` call in `Py_InitializeEx` to make
the code more obviously correct (it already didn't leak as
none of the dynamically allocated config fields were being
populated, but it's clearer if the wrappers follow the
documented API usage guidelines)
(cherry picked from commit
05e48865be69e1e5824f6915b588ff054717bb42 )
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>