Commit graph

118819 commits

Author SHA1 Message Date
Miss Islington (bot)
3991db062e
[3.12] gh-101384: Add socket timeout to ThreadedVSOCKSocketStreamTest and skip it on WSL (GH-101419) (GH-115585)
(cherry picked from commit 9fd420f53d)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
2024-02-17 15:03:04 +02:00
Miss Islington (bot)
23aef575c7
[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 465db27cb9)

Co-authored-by: Derek Higgins <derekh@redhat.com>
2024-02-17 15:01:48 +02:00
Miss Islington (bot)
9148b77e0a
[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 09fab93c3d)

Co-authored-by: Thomas Weißschuh <thomas@t-8ch.de>
2024-02-17 15:00:39 +02:00
Miss Islington (bot)
068e2190de
[3.12] gh-87688: Amend SSLContext.hostname_checks_common_name docs (GH-100517) (GH-115594)
(cherry picked from commit debb1386be)

Co-authored-by: Rami <72725910+ramikg@users.noreply.github.com>
2024-02-17 14:59:59 +02:00
Miss Islington (bot)
7218b81614
[3.12] gh-56499: Update the pickle library's note section for the __setstate__ function (GH-101062) (GH-115597)
(cherry picked from commit d5a30a1777)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-02-17 14:57:22 +02:00
Miss Islington (bot)
de347c0207
[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 26800cf25a)

Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
2024-02-17 14:56:00 +02:00
Miss Islington (bot)
d46a2a0008
[3.12] gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825) (GH-115601)
Since 2f3941d743 this function returns the
response string, rather than nothing.
(cherry picked from commit e88ebc1c40)

Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
2024-02-17 14:54:50 +02:00
Miss Islington (bot)
bf0e072980
[3.12] gh-96497: Mangle name before symtable lookup in 'symtable_extend_namedexpr_scope' (GH-96561) (GH-115603)
(cherry picked from commit 664965a1c1)

Co-authored-by: wookie184 <wookie1840@gmail.com>
2024-02-17 14:49:39 +02:00
Miss Islington (bot)
ebf8eb2740
[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>
2024-02-17 02:47:46 -07:00
Miss Islington (bot)
d08d5b6251
[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 318f2190bc)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2024-02-16 22:12:49 +00:00
Jelle Zijlstra
83c7dd5200
[3.12] gh-115570: Fix DeprecationWarnings in test_typing (#115571) (#115574)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-16 13:46:48 -08:00
Miss Islington (bot)
f383ca1a6f
[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>
2024-02-15 17:44:47 +02:00
Nikita Sobolev
9bc32cdc36
[3.12] gh-108303: Move all pydoc related files to test_pydoc (GH-114506) (#115502)
(cherry picked from commit ccc76c3e88)
2024-02-15 16:35:56 +03:00
Brett Cannon
0e4f73b8e4
[3.12] GH-113516: don't set LDSHARED when building for WASI (GH-115495) (GH-115496) 2024-02-15 01:19:42 +00:00
Miss Islington (bot)
14930acf5a
[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 4b2d1786cc)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-14 14:14:34 -08:00
Miss Islington (bot)
50f17a5a0a
[3.12] gh-112302: Move pip SBOM discovery to release-tools (GH-115360) (#115486)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-14 20:43:03 +00:00
Donghee Na
5ec52c35eb
[3.12] gh-112087: Fix reduce logic for the empty reverse iterator for list (gh-115471) 2024-02-14 18:44:26 +00:00
Miss Islington (bot)
7d9ce3c867
[3.12] Docs: spell out sentence about ndbm/gdbm file formats (GH-115470) (#115476)
(cherry picked from commit 49e8fdc1df)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-14 18:11:43 +00:00
Miss Islington (bot)
d25894332a
[3.12] gh-115243: Fix crash in deque.index() when the deque is concurrently modified (GH-115247) (GH-115465)
(cherry picked from commit 671360161f)

Co-authored-by: kcatss <kcats9731@gmail.com>
2024-02-14 17:17:58 +00:00
Miss Islington (bot)
13af281a53
[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 bb791c7728)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2024-02-14 15:58:14 +00:00
Miss Islington (bot)
59317167eb
[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 81e140d10b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-14 15:55:48 +00:00
Miss Islington (bot)
d5f7b07e92
[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 6755c4e0c8)

Co-authored-by: Stanislav Lyu <wallseat@gmail.com>
2024-02-14 17:07:55 +03:00
Miss Islington (bot)
527d9c9d7c
[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 ec8909a239)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-14 13:59:47 +00:00
Miss Islington (bot)
644aeb5dbb
[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 3fd2ad8241)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-14 10:47:59 +00:00
Miss Islington (bot)
03d2c3b804
[3.12] gh-113437: Update documentation about PyUnicode_AsWideChar() function (GH-113455) (GH-115407)
(cherry picked from commit 5719aa23ab)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
2024-02-14 11:24:40 +01:00
Miss Islington (bot)
9c7307520d
[3.12] gh-115383: Use runner version to compute config.cache key (GH-115409) (#115427)
Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-02-14 00:21:25 -07:00
Miss Islington (bot)
45e5599130
[3.12] gh-101100: Fix sphinx warnings in c-api/gcsupport.rst (GH-114786) (#115263)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-13 14:25:54 -07:00
Miss Islington (bot)
c2a3c3c643
[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 de07941729)

Co-authored-by: Christophe Papazian <114495376+christophe-papazian@users.noreply.github.com>
2024-02-13 16:16:22 +00:00
Miss Islington (bot)
79d1d6de1d
[3.12] gh-115252: Fix test_enum with -OO mode again (GH-115334) (GH-115396)
(cherry picked from commit ca3604a3e3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-13 10:38:27 +00:00
Mark Shannon
4d87832d87
[3.12] GH-112215: Backport C recursion changes (GH-115083) 2024-02-13 10:45:59 +01:00
Miss Islington (bot)
a30bb080dc
[3.12] Update "Using Python on a Mac" (GH-115024) (#115387)
Update "Using Python on a Mac" (GH-115024)
(cherry picked from commit 0a6e1a4119)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-13 09:05:46 +02:00
Miss Islington (bot)
1b36a8fc6a
[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 341d7874f0)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-02-13 07:29:31 +02:00
John Belmonte
09c98e4633
[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 72340d15cd)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
2024-02-12 23:31:12 +02:00
Miss Islington (bot)
2ed47d8f8b
[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 4297d7301b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-12 20:27:48 +00:00
Miss Islington (bot)
8774f50e29
[3.12] Remove stray backtick in NEWS entry (GH-115356) (#115364)
Remove stray backtick in NEWS entry (GH-115356)
(cherry picked from commit a82fbc13d0)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-02-12 19:30:30 +00:00
Serhiy Storchaka
225856ef3e
[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 91822018ee)
2024-02-12 18:29:48 +00:00
Miss Islington (bot)
90d1037046
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 c39272e143)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-02-12 18:18:45 +00:00
Hugo van Kemenade
5ec271db3b
[3.12] gh-101100: Fix Sphinx warnings in whatsnew/2.7.rst and related (GH-115319) (#115330) 2024-02-12 16:37:20 +02:00
Miss Islington (bot)
6ca300fcc6
[3.12] Add missing sections to blurbs (GH-114553) (#115336)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-12 14:22:48 +00:00
Miss Islington (bot)
67688609d2
[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 e1552fd19d)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2024-02-11 19:02:21 +00:00
Skip Montanaro
18f5264145
[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)
2024-02-11 11:32:37 -07:00
Serhiy Storchaka
cfb79caaab
[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 2939ad02be)
2024-02-11 13:56:34 +00:00
Serhiy Storchaka
d8346d6c06
[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 d9d6909697)
2024-02-11 11:56:17 +00:00
Miss Islington (bot)
d65cd8bc4e
[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 aeffc7f895)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-11 10:57:40 +00:00
Serhiy Storchaka
b9f560258c
[3.12] gh-115172: Fix explicit index extries for the C API (GH-115173) (GH-115292)
(cherry picked from commit 573acb30f2)
2024-02-11 10:34:41 +00:00
Miss Islington (bot)
c4fa79b924
[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 4a08e7b343)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-11 10:34:04 +00:00
Miss Islington (bot)
6e13e50859
[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 f8e9c57067)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 12:14:37 +03:00
Miss Islington (bot)
5baf90e038
[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 1f23837277)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 11:57:49 +03:00
Miss Islington (bot)
f036b357b2
[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 b70a68fbd6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 10:59:37 +03:00
Miss Islington (bot)
d19f0674ae
[3.12] gh-114670: Fix _testbuffer module initialization (GH-114672) (#115272)
(cherry picked from commit 3a5b38e3b4)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 10:53:00 +03:00