]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sat, 17 Feb 2024 13:03:04 +0000 (14:03 +0100)]
[3.12] gh-101384: Add socket timeout to ThreadedVSOCKSocketStreamTest and skip it on WSL (GH-101419) (GH-115585)
(cherry picked from commit
9fd420f53d1b1087d2ae648b0efc44107d27d867 )
Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
Miss Islington (bot) [Sat, 17 Feb 2024 13:01:48 +0000 (14:01 +0100)]
[3.12] gh-100985: Consistently wrap IPv6 IP address during CONNECT (GH-100986) (GH-115591)
Update _get_hostport to always remove square brackets
from IPv6 addresses. Then add them if needed
in "CONNECT .." and "Host: ".
(cherry picked from commit
465db27cb983084e718a1fd9519b2726c96935cb )
Co-authored-by: Derek Higgins <derekh@redhat.com>
Miss Islington (bot) [Sat, 17 Feb 2024 13:00:39 +0000 (14:00 +0100)]
[3.12] gh-100884: email/_header_value_parser: don't encode list separators (GH-100885) (GH-115592)
ListSeparator should not be encoded. This could happen when a long line
pushes its separator to the next line, which would have been encoded.
(cherry picked from commit
09fab93c3d857496c0bd162797fab816c311ee48 )
Co-authored-by: Thomas Weißschuh <thomas@t-8ch.de>
Miss Islington (bot) [Sat, 17 Feb 2024 12:59:59 +0000 (13:59 +0100)]
[3.12] gh-87688: Amend SSLContext.hostname_checks_common_name docs (GH-100517) (GH-115594)
(cherry picked from commit
debb1386be024181c8c003c5cbf61608024aee09 )
Co-authored-by: Rami <72725910+ramikg@users.noreply.github.com>
Miss Islington (bot) [Sat, 17 Feb 2024 12:57:22 +0000 (13:57 +0100)]
[3.12] gh-56499: Update the pickle library's note section for the __setstate__ function (GH-101062) (GH-115597)
(cherry picked from commit
d5a30a1777f04523c7b151b894e999f5714d8e96 )
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Miss Islington (bot) [Sat, 17 Feb 2024 12:56:00 +0000 (13:56 +0100)]
[3.12] gh-95782: Fix io.BufferedReader.tell() etc. being able to return offsets < 0 (GH-99709) (GH-115599)
lseek() always returns 0 for character pseudo-devices like
`/dev/urandom` (for other non-regular files, e.g. `/dev/stdin`, it
always returns -1, to which CPython reacts by raising appropriate
exceptions). They are thus technically seekable despite not having seek
semantics.
When calling read() on e.g. an instance of `io.BufferedReader` that
wraps such a file, `BufferedReader` reads ahead, filling its buffer,
creating a discrepancy between the number of bytes read and the internal
`tell()` always returning 0, which previously resulted in e.g.
`BufferedReader.tell()` or `BufferedReader.seek()` being able to return
positions < 0 even though these are supposed to be always >= 0.
Invariably keep the return value non-negative by returning
max(former_return_value, 0) instead, and add some corresponding tests.
(cherry picked from commit
26800cf25a0970d46934fa9a881c0ef6881d642b )
Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
Miss Islington (bot) [Sat, 17 Feb 2024 12:54:50 +0000 (13:54 +0100)]
[3.12] gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825) (GH-115601)
Since
2f3941d743481ac48628b8b2c075f2b82762050b this function returns the
response string, rather than nothing.
(cherry picked from commit
e88ebc1c4028cf2f0db43659e513440257eaec01 )
Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
Miss Islington (bot) [Sat, 17 Feb 2024 12:49:39 +0000 (13:49 +0100)]
[3.12] gh-96497: Mangle name before symtable lookup in 'symtable_extend_namedexpr_scope' (GH-96561) (GH-115603)
(cherry picked from commit
664965a1c141e8af5eb465d29099781a6a2fc3f3 )
Co-authored-by: wookie184 <wookie1840@gmail.com>
Miss Islington (bot) [Sat, 17 Feb 2024 09:47:46 +0000 (10:47 +0100)]
[3.12] gh-101100: Fix Sphinx warnings in `whatsnew/3.1.rst` (GH-115575) (#115587)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 16 Feb 2024 22:12:49 +0000 (23:12 +0100)]
[3.12] docs: Add glossary term references to shutil docs (GH-115559) (#115578)
docs: Add glossary term references to shutil docs (GH-115559)
Add glossary term references to shutil docs
(cherry picked from commit
318f2190bc93796008b0a4241243b0851b418436 )
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Jelle Zijlstra [Fri, 16 Feb 2024 21:46:48 +0000 (13:46 -0800)]
[3.12] gh-115570: Fix DeprecationWarnings in test_typing (#115571) (#115574)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 15 Feb 2024 15:44:47 +0000 (16:44 +0100)]
[3.12] gh-100734: What's New in 3.x: Add missing detail from 3.x branch (GH-114689) (#115526)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Nikita Sobolev [Thu, 15 Feb 2024 13:35:56 +0000 (16:35 +0300)]
[3.12] gh-108303: Move all `pydoc` related files to `test_pydoc` (GH-114506) (#115502)
(cherry picked from commit
ccc76c3e88647e416184bb1f5210b4e8946ae358 )
Brett Cannon [Thu, 15 Feb 2024 01:19:42 +0000 (17:19 -0800)]
[3.12] GH-113516: don't set `LDSHARED` when building for WASI (GH-115495) (GH-115496)
Miss Islington (bot) [Wed, 14 Feb 2024 22:14:34 +0000 (23:14 +0100)]
[3.12] gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (#115469)
gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431)
(cherry picked from commit
4b2d1786ccf913bc80ff571c32b196be1543ca54 )
Co-authored-by: Seth Michael Larson <seth@python.org>
Miss Islington (bot) [Wed, 14 Feb 2024 20:43:03 +0000 (21:43 +0100)]
[3.12] gh-112302: Move pip SBOM discovery to release-tools (GH-115360) (#115486)
Co-authored-by: Seth Michael Larson <seth@python.org>
Donghee Na [Wed, 14 Feb 2024 18:44:26 +0000 (03:44 +0900)]
[3.12] gh-112087: Fix reduce logic for the empty reverse iterator for list (gh-115471)
Miss Islington (bot) [Wed, 14 Feb 2024 18:11:43 +0000 (19:11 +0100)]
[3.12] Docs: spell out sentence about ndbm/gdbm file formats (GH-115470) (#115476)
(cherry picked from commit
49e8fdc1df41b6547fb3255f9e3a44dfb3b81fe0 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Wed, 14 Feb 2024 17:17:58 +0000 (18:17 +0100)]
[3.12] gh-115243: Fix crash in deque.index() when the deque is concurrently modified (GH-115247) (GH-115465)
(cherry picked from commit
671360161f0b7a5ff4c1d062e570962e851b4bde )
Co-authored-by: kcatss <kcats9731@gmail.com>
Miss Islington (bot) [Wed, 14 Feb 2024 15:58:14 +0000 (16:58 +0100)]
[3.12] gh-115392: Fix doctest reporting incorrect line numbers for decorated functions (GH-115440) (#115459)
gh-115392: Fix doctest reporting incorrect line numbers for decorated functions (GH-115440)
(cherry picked from commit
bb791c7728e0508ad5df28a90b27e202d66a9cfa )
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Miss Islington (bot) [Wed, 14 Feb 2024 15:55:48 +0000 (16:55 +0100)]
[3.12] Docs: reword sentences about dbm submodule traits (GH-114609) (#115462)
Don't repeatedly say that keys and values are coerced into bytes.
(cherry picked from commit
81e140d10b77f0a41a5581412e3f3471cc77981f )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Wed, 14 Feb 2024 14:07:55 +0000 (15:07 +0100)]
[3.12] gh-115403: Remove extra colon after "Examples" in datetime documentation (GH-115452) (#115455)
gh-115403: Remove extra colon after "Examples" in datetime documentation (GH-115452)
(cherry picked from commit
6755c4e0c8803a246e632835030c0b8837b3b676 )
Co-authored-by: Stanislav Lyu <wallseat@gmail.com>
Miss Islington (bot) [Wed, 14 Feb 2024 13:59:47 +0000 (14:59 +0100)]
[3.12] gh-115450: Fix direct invocation of `test_desctut` (GH-115451) (#115453)
gh-115450: Fix direct invocation of `test_desctut` (GH-115451)
(cherry picked from commit
ec8909a23931338f81803ea3f18dc2073f74a152 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Wed, 14 Feb 2024 10:47:59 +0000 (11:47 +0100)]
[3.12] ftplib docs: `timeout` doesn't have to be a whole number (GH-115443) (#115445)
ftplib docs: `timeout` doesn't have to be a whole number (GH-115443)
(cherry picked from commit
3fd2ad8241a61e75b2cd33c697af276863efbb51 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Wed, 14 Feb 2024 10:24:40 +0000 (11:24 +0100)]
[3.12] gh-113437: Update documentation about PyUnicode_AsWideChar() function (GH-113455) (GH-115407)
(cherry picked from commit
5719aa23ab7f1c7a5f03309ca4044078a98e7b59 )
Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Miss Islington (bot) [Wed, 14 Feb 2024 07:21:25 +0000 (08:21 +0100)]
[3.12] gh-115383: Use runner version to compute config.cache key (GH-115409) (#115427)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Tue, 13 Feb 2024 21:25:54 +0000 (22:25 +0100)]
[3.12] gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (GH-114786) (#115263)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 13 Feb 2024 16:16:22 +0000 (17:16 +0100)]
[3.12] gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411) (#115412)
gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411)
(cherry picked from commit
de07941729b8899b187b8ef9690f9a74b2d6286b )
Co-authored-by: Christophe Papazian <114495376+christophe-papazian@users.noreply.github.com>
Miss Islington (bot) [Tue, 13 Feb 2024 10:38:27 +0000 (11:38 +0100)]
[3.12] gh-115252: Fix test_enum with -OO mode again (GH-115334) (GH-115396)
(cherry picked from commit
ca3604a3e33d833ef698b44a4b82c5bc8c771fcb )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Mark Shannon [Tue, 13 Feb 2024 09:45:59 +0000 (09:45 +0000)]
[3.12] GH-112215: Backport C recursion changes (GH-115083)
Miss Islington (bot) [Tue, 13 Feb 2024 07:05:46 +0000 (08:05 +0100)]
[3.12] Update "Using Python on a Mac" (GH-115024) (#115387)
Update "Using Python on a Mac" (GH-115024)
(cherry picked from commit
0a6e1a4119864bec0247b04a5c99fdd9799cd8eb )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Tue, 13 Feb 2024 05:29:31 +0000 (06:29 +0100)]
[3.12] gh-115317: Rewrite changelog filter to use vanilla JavaScript (GH-115324) (#115372)
gh-115317: Rewrite changelog filter to use vanilla JavaScript (GH-115324)
(cherry picked from commit
341d7874f063dcb141672b09f62c19ffedd0a557 )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
John Belmonte [Mon, 12 Feb 2024 21:31:12 +0000 (06:31 +0900)]
[3.12] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) (GH-115353)
Immediate merits:
* eliminate complex workarounds for 'z' format support
(NOTE: mpdecimal recently added 'z' support, so this becomes
efficient in the long term.)
* fix 'z' format memory leak
* fix 'z' format applied to 'F'
* fix missing '#' format support
Suggested and prototyped by Stefan Krah.
Fixes gh-114563, gh-91060
(cherry picked from commit
72340d15cdfdfa4796fdd7c702094c852c2b32d2 )
Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Miss Islington (bot) [Mon, 12 Feb 2024 20:27:48 +0000 (21:27 +0100)]
[3.12] gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286) (#115359)
gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286)
(cherry picked from commit
4297d7301b97aba2e0df9f9cc5fa4010e53a8950 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 12 Feb 2024 19:30:30 +0000 (20:30 +0100)]
[3.12] Remove stray backtick in NEWS entry (GH-115356) (#115364)
Remove stray backtick in NEWS entry (GH-115356)
(cherry picked from commit
a82fbc13d0e352b9af7d7ffbef4bc04cf635f07f )
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Serhiy Storchaka [Mon, 12 Feb 2024 18:29:48 +0000 (20:29 +0200)]
[3.12] gh-115233: Fix an example in the Logging Cookbook (GH-115325) (GH-115355)
Also add more tests for LoggerAdapter.
Also support stacklevel in LoggerAdapter._log().
(cherry picked from commit
91822018eeba12a6c9eabbc748363b2fd4291b30 )
Miss Islington (bot) [Mon, 12 Feb 2024 18:18:45 +0000 (19:18 +0100)]
gh-115049: Fix py.exe failing when user has no LocalAppData. (GH-115185)
Also ensure we always display a debug message or error for RC_INTERNAL_ERROR
(cherry picked from commit
c39272e143b346bd6a3c04ca4fbf299163888277 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Hugo van Kemenade [Mon, 12 Feb 2024 14:37:20 +0000 (16:37 +0200)]
[3.12] gh-101100: Fix Sphinx warnings in `whatsnew/2.7.rst` and related (GH-115319) (#115330)
Miss Islington (bot) [Mon, 12 Feb 2024 14:22:48 +0000 (15:22 +0100)]
[3.12] Add missing sections to blurbs (GH-114553) (#115336)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Sun, 11 Feb 2024 19:02:21 +0000 (20:02 +0100)]
[3.12] gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825) (GH-115308)
(cherry picked from commit
e1552fd19de17e7a6daa3c2a6d1ca207bb8eaf8e )
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Skip Montanaro [Sun, 11 Feb 2024 18:32:37 +0000 (12:32 -0600)]
[3.12] gh-101100: Fix dangling refs in bdb.rst (#114983) (#115297)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Fix dangling refs in bdb.rst (#114983)
Serhiy Storchaka [Sun, 11 Feb 2024 13:56:34 +0000 (15:56 +0200)]
[3.12] gh-97959: Fix rendering of routines in pydoc (GH-113941) (GH-115296)
* Class methods no longer have "method of builtins.type instance" note.
* Corresponding notes are now added for class and unbound methods.
* Method and function aliases now have references to the module or the
class where the origin was defined if it differs from the current.
* Bound methods are now listed in the static methods section.
* Methods of builtin classes are now supported as well as methods of
Python classes.
(cherry picked from commit
2939ad02be62110ffa2ac6c4d9211c85e1d1720f )
Serhiy Storchaka [Sun, 11 Feb 2024 11:56:17 +0000 (13:56 +0200)]
[3.12] gh-115011: Improve support of __index__() in setters of members with unsigned integer type (GH-115029) (GH-115294)
Setters for members with an unsigned integer type now support
the same range of valid values for objects that has a __index__()
method as for int.
Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not support
objects that has a __index__() method larger than LONG_MAX.
Py_T_ULLONG did not support negative ints. Now it supports them and
emits a RuntimeWarning.
(cherry picked from commit
d9d6909697501a2604d5895f9f88aeec61274ab0 )
Miss Islington (bot) [Sun, 11 Feb 2024 10:57:40 +0000 (11:57 +0100)]
[3.12] gh-79382: Fix recursive glob() with trailing "**" (GH-115134) (GH-115290)
Trailing "**" no longer allows to match files and non-existing paths in
recursive glob().
(cherry picked from commit
aeffc7f8951e04258f0fd8cadfa6cd8b704730f6 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Sun, 11 Feb 2024 10:34:41 +0000 (12:34 +0200)]
[3.12] gh-115172: Fix explicit index extries for the C API (GH-115173) (GH-115292)
(cherry picked from commit
573acb30f22a84c0f2c951efa002c9946e29b6a3 )
Miss Islington (bot) [Sun, 11 Feb 2024 10:34:04 +0000 (11:34 +0100)]
[3.12] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164) (GH-115288)
Feeding the parser by too small chunks defers parsing to prevent
CVE-2023-52425. Future versions of Expat may be more reactive.
(cherry picked from commit
4a08e7b3431cd32a0daf22a33421cd3035343dc4 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 11 Feb 2024 09:14:37 +0000 (10:14 +0100)]
[3.12] gh-115274: Fix direct invocation of `testmock/testpatch.py` (GH-115275) (#115280)
gh-115274: Fix direct invocation of `testmock/testpatch.py` (GH-115275)
(cherry picked from commit
f8e9c57067e32baab4ed2fd824b892c52ecb7225 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 11 Feb 2024 08:57:49 +0000 (09:57 +0100)]
[3.12] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115277)
gh-115249: Fix `test_descr` with `-OO` mode (GH-115250)
(cherry picked from commit
1f23837277e604f41589273aeb3a10377d416510 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 11 Feb 2024 07:59:37 +0000 (08:59 +0100)]
[3.12] gh-115254: Fix `test_property` with `-00` mode (GH-115255) (#115261)
gh-115254: Fix `test_property` with `-00` mode (GH-115255)
(cherry picked from commit
b70a68fbd6b72a25b5ef430603e39c9e40f40d29 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 11 Feb 2024 07:53:00 +0000 (08:53 +0100)]
[3.12] gh-114670: Fix `_testbuffer` module initialization (GH-114672) (#115272)
(cherry picked from commit
3a5b38e3b465e00f133ff8074a2d4afb1392dfb5 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 11 Feb 2024 05:15:40 +0000 (06:15 +0100)]
[3.12] gh-115252: Fix `test_enum` with `-OO` mode (GH-115253) (GH-115260)
(cherry picked from commit
33f56b743285f8419e92cfabe673fa165165a580 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 10 Feb 2024 14:04:49 +0000 (15:04 +0100)]
[3.12] gh-115059: Remove debugging code in test_io (GH-115240) (GH-115244)
(cherry picked from commit
597fad07f7bf709ac7084ac20aa3647995759b01 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 10 Feb 2024 08:50:31 +0000 (09:50 +0100)]
[3.12] gh-114552: Update `__dir__` method docs: it allows returning an iterable (GH-114662) (#115234)
gh-114552: Update `__dir__` method docs: it allows returning an iterable (GH-114662)
(cherry picked from commit
e19103a346f0277c44a43dfaebad9a5aa468bf1e )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Fri, 9 Feb 2024 22:31:57 +0000 (23:31 +0100)]
[3.12] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) (#115227)
gh-115165: Fix `typing.Annotated` for immutable types (GH-115213)
The return value from an annotated callable can raise any exception from
__setattr__ for the `__orig_class__` property.
(cherry picked from commit
564385612cdf72c2fa8e629a68225fb2cd3b3d99 )
Co-authored-by: dave-shawley <daveshawley@gmail.com>
Nikita Sobolev [Fri, 9 Feb 2024 20:10:26 +0000 (23:10 +0300)]
[3.12] gh-101100: Fix sphinx warnings in `library/enum.rst` (GH-114696) (GH-115208)
Miss Islington (bot) [Fri, 9 Feb 2024 14:17:49 +0000 (15:17 +0100)]
[3.12] Docs: correctly link to code objects (GH-115214) (#115216)
(cherry picked from commit
769d4448260aaec687d9306950225316f9faefce )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Fri, 9 Feb 2024 11:00:35 +0000 (12:00 +0100)]
[3.12] gh-115059: Flush the underlying write buffer in io.BufferedRandom.read1() (GH-115163) (GH-115205)
(cherry picked from commit
846fd721d518dda88a7d427ec3d2c03c45d9fa90 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 8 Feb 2024 22:15:58 +0000 (23:15 +0100)]
gh-115167: Exclude vcruntime140_threads.dll from Windows build output (GH-115176)
(cherry picked from commit
5914a211ef5542edd1f792c2684e373a42647b04 )
Co-authored-by: adang1345 <adang1345@gmail.com>
Miss Islington (bot) [Thu, 8 Feb 2024 22:03:12 +0000 (23:03 +0100)]
[3.12] gh-115106 docs: 'enum.Flag.__iter__()' did not exist prior to Python 3.11 (GH-115107) (GH-115117)
change versionchanged to versionadded
(cherry picked from commit
3f71c416c085cfaed49ef325f70eb374a4966256 )
Co-authored-by: Finite State Machine <38001514+finite-state-machine@users.noreply.github.com>
Miss Islington (bot) [Thu, 8 Feb 2024 22:01:38 +0000 (23:01 +0100)]
[3.12] gh-114071: [Enum] update docs and code for tuples/subclasses (GH-114871) (GH-114993)
Update documentation with `__new__` and `__init__` entries.
Support use of `auto()` in tuple subclasses on member assignment lines. Previously, auto() was only supported on the member definition line either solo or as part of a tuple:
RED = auto()
BLUE = auto(), 'azul'
However, since Python itself supports using tuple subclasses where tuples are expected, e.g.:
from collections import namedtuple
T = namedtuple('T', 'first second third')
def test(one, two, three):
print(one, two, three)
test(*T(4, 5, 6))
GH- 4 5 6
it made sense to also support tuple subclasses in enum definitions.
(cherry picked from commit
ff7588b729a2a414ea189a2012904da3fbd1401c )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Thu, 8 Feb 2024 09:18:38 +0000 (10:18 +0100)]
[3.12] gh-115136: Fix possible NULL deref in getpath_joinpath() (GH-115137) (GH-115157)
(cherry picked from commit
9e90313320a2af2d9ff7049ed3842344ed236630 )
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Co-authored-by: Artem Chernyshev <62871052+dTenebrae@users.noreply.github.com>
Miss Islington (bot) [Thu, 8 Feb 2024 08:30:31 +0000 (09:30 +0100)]
[3.12] gh-115146: Fix typo in pickletools.py documentation (GH-115148) (GH-115155)
(cherry picked from commit
4a7f63869aa61b24a7cc2d33f8a5e5a7fd0d76a4 )
Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
Miss Islington (bot) [Wed, 7 Feb 2024 20:39:22 +0000 (21:39 +0100)]
[3.12] gh-114828: parenthesize non-atomic macro definitions in pycore_symtable.h (GH-115143) (#115149)
gh-114828: parenthesize non-atomic macro definitions in pycore_symtable.h (GH-115143)
(cherry picked from commit
8f0998e844c2fd8c0c94681d0a6331c34ee31562 )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Miss Islington (bot) [Wed, 7 Feb 2024 17:12:54 +0000 (18:12 +0100)]
[3.12] gh-114828: Fix __class__ in class-scope inlined comprehensions (GH-115139) (#115140)
gh-114828: Fix __class__ in class-scope inlined comprehensions (GH-115139)
(cherry picked from commit
fedbf77191ea9d6515b39f958cc9e588d23517c9 )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Miss Islington (bot) [Wed, 7 Feb 2024 10:55:21 +0000 (11:55 +0100)]
[3.12] gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003) (#115135)
gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003)
(cherry picked from commit
d0322fdf2c1a7292a43959fe5a572d783b88a1c4 )
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Miss Islington (bot) [Wed, 7 Feb 2024 09:36:10 +0000 (10:36 +0100)]
[3.12] gh-103224: Resolve paths properly in test_sysconfig (GH-103292) (GH-115100)
To pass tests when executed through a Python symlink.
(cherry picked from commit
71239d50b54c90afd3fdde260848e0c6d73a5c27 )
Co-authored-by: Artem Mukhin <artem.m.mukhin@gmail.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Thomas Wouters [Tue, 6 Feb 2024 23:44:54 +0000 (00:44 +0100)]
Merge branch '3.12' of https://github.com/python/cpython into 3.12
Thomas Wouters [Tue, 6 Feb 2024 23:44:32 +0000 (00:44 +0100)]
Post 3.12.2
Erlend E. Aasland [Tue, 6 Feb 2024 23:02:58 +0000 (00:02 +0100)]
[3.12] gh-115009: Update Windows installer to use SQLite 3.45.1 (#115065) (#115110)
(cherry picked from commit
11ac6f5354ec7a4da2a7e052d27d636b5a41c714 )
Thomas Wouters [Tue, 6 Feb 2024 20:16:03 +0000 (21:16 +0100)]
Python 3.12.2
Miss Islington (bot) [Tue, 6 Feb 2024 19:05:05 +0000 (20:05 +0100)]
[3.12] GH-gh-75705: Set unixfrom envelope in mailbox._mboxMMDF (GH-107117) (GH-115098)
(cherry picked from commit
76108b8b05040fc49a6bc50eb2e990576595c57c )
Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
Miss Islington (bot) [Tue, 6 Feb 2024 18:34:03 +0000 (19:34 +0100)]
[3.12] gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (GH-115038) (#115088)
* gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (GH-115038)
(cherry picked from commit
4bf41879d03b1da3c6d38c39a04331e3ae2e7545 )
Co-authored-by: Seth Michael Larson <seth@python.org>
* Update pip SBOM package to version in source
---------
Co-authored-by: Seth Michael Larson <seth@python.org>
Łukasz Langa [Tue, 6 Feb 2024 17:59:23 +0000 (18:59 +0100)]
[3.12] gh-46968: Fix invalid reference to Sound eXchange (SoX) 12.17.7 license (#115094)
Fix invalid reference to Sound eXchange (SoX) 12.17.7 license
Seth Michael Larson [Tue, 6 Feb 2024 15:02:28 +0000 (09:02 -0600)]
[3.12] gh-112302: Backport SBOM generation tooling (#114730)
[3.12] Backport SBOM generation tooling
Miss Islington (bot) [Tue, 6 Feb 2024 14:53:30 +0000 (15:53 +0100)]
[3.12] gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) (GH-115076)
gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
(cherry picked from commit
618d7256e78da8200f6e2c6235094a1ef885dca4 )
Co-authored-by: Zachary Ware <zach@python.org>
Miss Islington (bot) [Tue, 6 Feb 2024 13:26:39 +0000 (14:26 +0100)]
[3.12] gh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning (GH-106234) (GH-115081)
(cherry picked from commit
d7334e2c2012defaf7aae920d6a56689464509d1 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Erlend E. Aasland [Tue, 6 Feb 2024 10:21:53 +0000 (11:21 +0100)]
[3.12] gh-115009: Update macOS installer to use SQLite 3.45.1 (#115066) (#115071)
(cherry picked from commit
13eb5215c9de9dd302f116ef0bca4ae23b02842b )
Co-authored-by: Ned Deily <nad@python.org>
Erlend E. Aasland [Tue, 6 Feb 2024 10:20:16 +0000 (11:20 +0100)]
[3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016) (#115067)
(cherry picked from commit
09096a1647913526a3d4fa69a9d2056ec82a8f37 )
Miss Islington (bot) [Tue, 6 Feb 2024 02:29:17 +0000 (03:29 +0100)]
[3.12] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (GH-115055)
Also update multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1.
(cherry picked from commit
299e16ca0f303a1e00bd0e04679862a5d4db5ab2 )
Co-authored-by: Ned Deily <nad@python.org>
Miss Islington (bot) [Tue, 6 Feb 2024 02:16:32 +0000 (03:16 +0100)]
[3.12] gh-109991: Update macOS installer to use OpenSSL 3.0.13. (GH-115053)
(cherry picked from commit
638e811a3c54a81d8af5a4c08b9497d210823f78 )
Co-authored-by: Ned Deily <nad@python.org>
Zachary Ware [Tue, 6 Feb 2024 00:11:15 +0000 (18:11 -0600)]
[3.12] gh-109991: Update Windows build to use OpenSSL 3.0.13 (#115047)
(cherry picked from commit
01dceba13e872e9ca24b8e00a2b75db3d0d6c1a3 )
Miss Islington (bot) [Mon, 5 Feb 2024 21:02:00 +0000 (22:02 +0100)]
[3.12] gh-109475: Fix support of explicit option value "--" in argparse (GH-114814) (GH-115036)
For example "--option=--".
(cherry picked from commit
4aa4f0906df9fc9c6c6f6657f2c521468c6b1688 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 5 Feb 2024 20:30:38 +0000 (21:30 +0100)]
[3.12] gh-114967: Fix "Built-in Exceptions" documentation ambiguous wording (GH-114968) (#115033)
Change the somewhat vague "listed below" to "listed in this chapter" in Doc/library/exceptions.rst.
The exceptions are listed in multiple sections after two intermediate sections.
---------
(cherry picked from commit
750489cc774df44daa2c0d23e8a404fe62be93d1 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: HarryLHW <123lhw321@gmail.com>
Miss Islington (bot) [Mon, 5 Feb 2024 09:53:57 +0000 (10:53 +0100)]
[3.12] GH-69695: Update ``PyImport_ImportModule`` description (GH-103836) GH-114925)
GH-69695: Update ``PyImport_ImportModule`` description (GH-103836)
(cherry picked from commit
9872855a31720f514b84373848b49fca09d66ecd )
Co-authored-by: patenaud <33957588+patenaud@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 5 Feb 2024 04:17:58 +0000 (05:17 +0100)]
[3.12] Remove bogus syntax error marker in csv doc (GH-115017) (#115018)
(cherry picked from commit
39ec7fbba84663ab760853da2ac422c2e988d189 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Travis Howse [Sun, 4 Feb 2024 23:42:06 +0000 (09:42 +1000)]
[3.12] gh-114887 Reject only sockets of type SOCK_STREAM in create_da… (#114980)
Also improve exception message.
(cherry picked from commit
94ec2b9c9ce898723c3fe61fbc64d6c8f4f68700 )
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
Tian Gao [Sun, 4 Feb 2024 22:27:17 +0000 (14:27 -0800)]
[3.12] gh-114480: Add docs for f_trace_opcodes behavior on 3.12 (#114540)
Miss Islington (bot) [Sun, 4 Feb 2024 20:41:25 +0000 (21:41 +0100)]
[3.12] gh-114392: Improve test_capi.test_structmembers (GH-114393) (GH-115010)
Test all integer member types with extreme values and values outside of
the valid range. Test support of integer-like objects. Test warnings for
wrapped out values.
(cherry picked from commit
15f6f048a6ecdf0f6f4fc076d013be3d110f8ed6 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 4 Feb 2024 19:00:03 +0000 (20:00 +0100)]
[3.12] gh-113803: Fix inaccurate documentation for shutil.move when dst is an existing directory (GH-113837) (#115006)
* fix the usage of dst and destination in shutil.move doc
* update shutil.move doc
(cherry picked from commit
da8f9fb2ea65cc2784c2400fc39ad8c800a67a42 )
Co-authored-by: Dai Wentao <dwt136@gmail.com>
Serhiy Storchaka [Sun, 4 Feb 2024 17:21:05 +0000 (19:21 +0200)]
[3.12] gh-114388: Fix warnings when assign an unsigned integer member (GH-114391) (GH-115001)
* Fix a RuntimeWarning emitted when assign an integer-like value that
is not an instance of int to an attribute that corresponds to a C
struct member of type T_UINT and T_ULONG.
* Fix a double RuntimeWarning emitted when assign a negative integer value
to an attribute that corresponds to a C struct member of type T_UINT.
(cherry picked from commit
3ddc5152550ea62280124c37d0b4339030ff7df4 )
Miss Islington (bot) [Sun, 4 Feb 2024 16:43:56 +0000 (17:43 +0100)]
[3.12] gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds "funcid" (GH-113955) (GH-114997)
Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and
Canvas widgets destroyed the current binding for "sequence", leaving
"sequence" unbound, and deleted the "funcid" command.
Now they remove only "funcid" from the binding for "sequence", keeping
other commands, and delete the "funcid" command.
They leave "sequence" unbound only if "funcid" was the last bound command.
(cherry picked from commit
7e42fddf608337e83b30401910d76fd75d5cf20a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 4 Feb 2024 16:12:19 +0000 (17:12 +0100)]
[3.12] gh-113280: Always close socket if SSLSocket creation failed (GH-114659) (GH-114995)
(cherry picked from commit
0ea366240b75380ed7568acbe95d72e481a734f7 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Skip Montanaro [Sun, 4 Feb 2024 16:03:21 +0000 (10:03 -0600)]
[3.12] gh-101100: Fix dangling references in pickle.rst (#114972) (#114999)
gh-101100: Fix dangling references in pickle.rst (#114972)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit
ec69e1d0ddc9906e0fb755a5234aeabdc96450ab )
Miss Islington (bot) [Sun, 4 Feb 2024 16:00:56 +0000 (17:00 +0100)]
[3.12] gh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.12 (GH-106588)" (GH-114470) (GH-114994)
This reverts commit
8fc071345b50dd3de61ebeeaa287ccef21d061b2 .
(cherry picked from commit
ecabff98c41453f15ecd26ac255d531b571b9bc1 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Hugo van Kemenade [Sun, 4 Feb 2024 11:53:45 +0000 (13:53 +0200)]
[3.12] gh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation (GH-114327) (#114988)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix Sphinx warnings from PEP 3108 stdlib re-organisation (#114327)
Miss Islington (bot) [Sun, 4 Feb 2024 08:57:19 +0000 (09:57 +0100)]
[3.12] gh-101100: Fix sphinx warnings in `c-api/file.rst` (GH-114546) (#114584)
* gh-101100: Fix sphinx warnings in `c-api/file.rst` (GH-114546)
(cherry picked from commit
01d970c1b8acf3ccf199d5de151a635ffd9d8c61 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Stéphane Bidoul [Sat, 3 Feb 2024 19:37:13 +0000 (20:37 +0100)]
[3.12] gh-114965: Updated bundled pip to 24.0 (gh-114966) (gh-114971)
gh-114965: Updated bundled pip to 24.0 (gh-114966)
Updated bundled pip to 24.0
(cherry picked from commit
a4c298c1494b602a9650b597aad50b48e3fa1f41 )
Miss Islington (bot) [Sat, 3 Feb 2024 18:51:43 +0000 (19:51 +0100)]
[3.12] gh-101100: Fix Sphinx reference warnings in the glossary (GH-114729) (#114969)
gh-101100: Fix Sphinx reference warnings in the glossary (GH-114729)
(cherry picked from commit
ab76d37948fd506af44762dc1c3e32f27d1327a8 )
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sat, 3 Feb 2024 16:39:01 +0000 (17:39 +0100)]
[3.12] gh-114959: tarfile: do not ignore errors when extract a directory on top of a file (GH-114960) (GH-114963)
Also, add tests common to tarfile and zipfile.
(cherry picked from commit
96bce033c4a4da7112792ba335ef3eb9a3eb0da0 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 3 Feb 2024 15:41:04 +0000 (16:41 +0100)]
[3.12] gh-114955: Add clear to MutableSequence's mixin methods in document (gh-114956) (gh-114961)