Commit graph

116499 commits

Author SHA1 Message Date
Miss Islington (bot)
b87a443146
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/3.2.rst (GH-115580) (#115590)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-17 14:51:28 -07:00
Serhiy Storchaka
5dac9c53cd
[3.11] gh-115618: Remove improper Py_XDECREFs in property methods (GH-115619) (GH-115621)
(cherry picked from commit 090dd21ab9)
2024-02-17 21:47:32 +00:00
Miss Islington (bot)
cd0a071fdd
[3.11] gh-115596: Fix ProgramPriorityTests in test_os permanently changing the process priority (GH-115610) (GH-115617)
(cherry picked from commit 90dd653a61)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2024-02-17 19:14:41 +02:00
Kirill Podoprigora
ee3d8dcb00
[3.11] gh-107155: Fix help() for lambda function with return annotation (GH-115613)
(cherry picked from commit b9a9e3dd62)
2024-02-17 17:39:48 +02:00
Miss Islington (bot)
a23aecc737
[3.11] Fix ProgramPriorityTests on FreeBSD with high nice value (GH-100145) (GH-115615)
It expects priority to be capped with 19, which is the cap for Linux,
but for FreeBSD the cap is 20 and the test fails under the similar
conditions. Tweak the condition to cover FreeBSD as well.
(cherry picked from commit 437924465d)

Co-authored-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
2024-02-17 15:38:38 +00:00
Serhiy Storchaka
6fbc61070f
[3.11] gh-100985: Consistently wrap IPv6 IP address during CONNECT (GH-100986) (GH-115606)
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 14:15:21 +00:00
Miss Islington (bot)
a6776cdc53
[3.11] Document use of ANY in test assertions (GH-94060) (GH-115608)
(cherry picked from commit 04005f5021)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-02-17 13:24:40 +00:00
Serhiy Storchaka
51b974b0ab
[3.11] gh-96497: Mangle name before symtable lookup in 'symtable_extend_namedexpr_scope' (GH-96561) (GH-115604)
(cherry picked from commit 664965a1c1)

Co-authored-by: wookie184 <wookie1840@gmail.com>
2024-02-17 13:13:26 +00:00
Miss Islington (bot)
5b6e358913
[3.11] gh-101699: Explain using Match.expand with \g<0> (GH-101701) (GH-115584)
Update documentation for re library to explain that a backreference `\g<0>` is
expanded to the entire string when using Match.expand().
Note that numeric backreferences to group 0 (`\0`) are not supported.

(cherry picked from commit d2d7808853)

Co-authored-by: Stevoisiak <S.Vascellaro@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-17 15:03:43 +02:00
Miss Islington (bot)
4077f1445c
[3.11] gh-101384: Add socket timeout to ThreadedVSOCKSocketStreamTest and skip it on WSL (GH-101419) (GH-115586)
(cherry picked from commit 9fd420f53d)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
2024-02-17 15:02:47 +02:00
Miss Islington (bot)
70754d21c2
[3.11] gh-100884: email/_header_value_parser: don't encode list separators (GH-100885) (GH-115593)
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:01:02 +02:00
Miss Islington (bot)
bc11905d48
[3.11] gh-87688: Amend SSLContext.hostname_checks_common_name docs (GH-100517) (GH-115595)
(cherry picked from commit debb1386be)

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

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-02-17 14:56:54 +02:00
Miss Islington (bot)
a5eaa14584
[3.11] gh-95782: Fix io.BufferedReader.tell() etc. being able to return offsets < 0 (GH-99709) (GH-115600)
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:55:43 +02:00
Miss Islington (bot)
2c39d00a56
[3.11] gh-97590: Update docs and tests for ftplib.FTP.voidcmd() (GH-96825) (GH-115602)
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:31 +02:00
Miss Islington (bot)
ba2f2ca632
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/3.1.rst (GH-115575) (#115588)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-17 02:47:54 -07:00
Miss Islington (bot)
7de9caec0d
[3.11] docs: Add glossary term references to shutil docs (GH-115559) (#115579)
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:45 +00:00
Jelle Zijlstra
c01a4808d3
[3.11] gh-115570: Fix DeprecationWarnings in test_typing (#115571)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-16 19:37:42 +00:00
Hugo van Kemenade
963315cbd9
[3.11] gh-100734: What's New in 3.x: Add missing detail from 3.x branch (GH-114689) (#115527) 2024-02-15 17:44:50 +02:00
Nikita Sobolev
c3a274b0fe
[3.11] gh-108303: Move all pydoc related files to test_pydoc (GH-114506) (#115501)
(cherry picked from commit ccc76c3e88)
2024-02-15 16:36:10 +03:00
Miss Islington (bot)
9bb3f56592
[3.11] [3.12] GH-113516: don't set LDSHARED when building for WASI (GH-115495) (GH-115496) (GH-115497)
[3.12] GH-113516: don't set `LDSHARED` when building for WASI (GH-115495) (GH-115496)
(cherry picked from commit 0e4f73b8e4)

Co-authored-by: Brett Cannon <brett@python.org>
2024-02-14 17:34:45 -08:00
Donghee Na
1739efc57d
[3.11] gh-112087: Fix reduce logic for the empty reverse iterator for list (gh-115472) 2024-02-14 18:43:39 +00:00
Miss Islington (bot)
c12b0a25e8
[3.11] Docs: spell out sentence about ndbm/gdbm file formats (GH-115470) (#115477)
(cherry picked from commit 49e8fdc1df)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-14 18:10:06 +00:00
Seth Michael Larson
e071b0d558
[3.11] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115468)
Manual backport due to code differences.
2024-02-14 18:29:27 +01:00
Miss Islington (bot)
0e07ebdba4
[3.11] gh-115243: Fix crash in deque.index() when the deque is concurrently modified (GH-115247) (GH-115466)
(cherry picked from commit 671360161f)

Co-authored-by: kcatss <kcats9731@gmail.com>
2024-02-14 17:21:12 +00:00
Miss Islington (bot)
7b94f47e68
[3.11] Docs: reword sentences about dbm submodule traits (GH-114609) (#115463)
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:56:04 +00:00
Miss Islington (bot)
c4e8ffb9a1
[3.11] gh-115392: Fix doctest reporting incorrect line numbers for decorated functions (GH-115440) (#115458)
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:55:48 +00:00
Hugo van Kemenade
cb941e1264
[3.11] gh-101100: Fix sphinx warnings in c-api/gcsupport.rst (GH-114786) (#115430)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-14 16:32:58 +02:00
Miss Islington (bot)
8dae36d1fb
[3.11] gh-115403: Remove extra colon after "Examples" in datetime documentation (GH-115452) (#115456)
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:21 +03:00
Miss Islington (bot)
1a8165012d
[3.11] gh-115450: Fix direct invocation of test_desctut (GH-115451) (#115454)
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 14:04:23 +00:00
Miss Islington (bot)
c274fe7534
[3.11] ftplib docs: timeout doesn't have to be a whole number (GH-115443) (#115446)
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:48:10 +00:00
Miss Islington (bot)
7f88cb1f28
[3.11] gh-113437: Update documentation about PyUnicode_AsWideChar() function (GH-113455) (GH-115408)
(cherry picked from commit 5719aa23ab)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
2024-02-14 11:24:54 +01:00
Hugo van Kemenade
b5873793c0
[3.11] gh-115383: Use runner version to compute config.cache key (GH-115409) (#115428)
Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-02-14 00:21:29 -07:00
Miss Islington (bot)
0af16e3dc6
[3.11] gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411) (#115413)
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
Serhiy Storchaka
7ba2d78cbb
[3.11] gh-115252: Fix test_enum with -OO mode again (GH-115334) (GH-115397)
(cherry picked from commit ca3604a3e3)
2024-02-13 10:40:40 +00:00
John Belmonte
b86fdf2222
[3.11] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) (GH-115384)
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 'GH-' format support

Suggested and prototyped by Stefan Krah.

Fixes gh-114563, gh-91060

(cherry picked from commit 72340d15cd)
(cherry picked from commit 09c98e4633)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2024-02-13 10:38:06 +02:00
Miss Islington (bot)
d87a02223c
[3.11] Update "Using Python on a Mac" (GH-115024) (#115388)
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:06:35 +02:00
Miss Islington (bot)
a33ae3b63e
[3.11] gh-115317: Rewrite changelog filter to use vanilla JavaScript (GH-115324) (#115373)
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:30:54 +02:00
Miss Islington (bot)
21edde17b3
[3.11] gh-115233: Fix an example in the Logging Cookbook (GH-115325) (GH-115355) (GH-115357)
Also add more tests for LoggerAdapter.

Also support stacklevel in LoggerAdapter._log().
(cherry picked from commit 225856ef3e)
(cherry picked from commit 91822018ee)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-12 23:25:47 +02:00
Miss Islington (bot)
d732134232
[3.11] gh-115285: Fix test_dataclasses with -OO mode (GH-115286) (#115358)
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:21:18 +00:00
Miss Islington (bot)
c568d44a54
[3.11] Remove stray backtick in NEWS entry (GH-115356) (#115363)
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:22 +00:00
Hugo van Kemenade
f0c58c6475
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.7.rst and related (GH-115319) (#115331) 2024-02-12 16:37:28 +02:00
Miss Islington (bot)
9b6aba2751
[3.11] Add missing sections to blurbs (GH-114553) (#115337)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-12 14:22:41 +00:00
Serhiy Storchaka
5f938c1104
[3.11] gh-115198: Fix support of Docutils >= 0.19 in distutils (GH-115220) 2024-02-12 13:45:22 +02:00
Skip Montanaro
07fff60fb2
[3.11] gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825) (GH-115311)
(cherry picked from commit e1552fd19d)
2024-02-12 12:54:44 +02:00
Nikita Sobolev
879d8c4660
[3.11] gh-115252: Fix test_enum with -OO mode (GH-115253) (#115279)
(cherry picked from commit 33f56b7432)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 18:19:59 +03:00
Serhiy Storchaka
b9e90031a3
[3.11] [3.12] gh-97959: Fix rendering of routines in pydoc (GH-113941) (GH-115296) (GH-115302)
* 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)
(cherry picked from commit cfb79caaab)
2024-02-11 15:19:43 +00:00
Miss Islington (bot)
83a69a6a01
[3.11] gh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469) (GH-115300)
(cherry picked from commit 8a3d0e4a66)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-11 14:51:32 +00:00
Serhiy Storchaka
75d92f5c4e
[3.11] gh-99430: Remove duplicated tests for old-styled classes (GH-99432) (GH-115298)
python 1 & 2 were a loong time ago.
(cherry picked from commit d329f859b9)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-11 14:29:23 +00:00
Serhiy Storchaka
7273a58a85
[3.11] gh-115011: Improve support of __index__() in setters of members with unsigned integer type (GH-115029) (GH-115295)
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 12:03:48 +00:00