Commit graph

118809 commits

Author SHA1 Message Date
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
Miss Islington (bot)
ada6629169
[3.12] gh-115252: Fix test_enum with -OO mode (GH-115253) (GH-115260)
(cherry picked from commit 33f56b7432)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-10 21:15:40 -08:00
Miss Islington (bot)
a5f49ce65e
[3.12] gh-115059: Remove debugging code in test_io (GH-115240) (GH-115244)
(cherry picked from commit 597fad07f7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-10 16:04:49 +02:00
Miss Islington (bot)
7cc205872d
[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 e19103a346)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-10 08:50:31 +00:00
Miss Islington (bot)
321ec5e0fe
[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 564385612c)

Co-authored-by: dave-shawley <daveshawley@gmail.com>
2024-02-09 22:31:57 +00:00
Nikita Sobolev
3539b02873
[3.12] gh-101100: Fix sphinx warnings in library/enum.rst (GH-114696) (GH-115208) 2024-02-09 12:10:26 -08:00
Miss Islington (bot)
370cbbbfeb
[3.12] Docs: correctly link to code objects (GH-115214) (#115216)
(cherry picked from commit 769d444826)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-09 14:17:49 +00:00
Miss Islington (bot)
0211f919b1
[3.12] gh-115059: Flush the underlying write buffer in io.BufferedRandom.read1() (GH-115163) (GH-115205)
(cherry picked from commit 846fd721d5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-09 11:00:35 +00:00
Miss Islington (bot)
235c54fe9c
gh-115167: Exclude vcruntime140_threads.dll from Windows build output (GH-115176)
(cherry picked from commit 5914a211ef)

Co-authored-by: adang1345 <adang1345@gmail.com>
2024-02-08 22:15:58 +00:00
Miss Islington (bot)
108ff59c8f
[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 3f71c416c0)

Co-authored-by: Finite State Machine <38001514+finite-state-machine@users.noreply.github.com>
2024-02-08 14:03:12 -08:00
Miss Islington (bot)
7d2f88edf0
[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 ff7588b729)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-02-08 14:01:38 -08:00