Commit graph

116367 commits

Author SHA1 Message Date
Serhiy Storchaka
c67f94e385
[3.11] gh-101100: Fix datetime reference warnings (GH-114661) (GH-114718)
(cherry picked from commit e8b8f5e9c2)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2024-01-29 15:20:05 +00:00
Miss Islington (bot)
07d68ea843
[3.11] gh-89159: Add some TarFile attribute types (GH-114520) (GH-114715)
(cherry picked from commit d7d0d13cd3)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2024-01-29 14:25:52 +00:00
Miss Islington (bot)
ca9a7fc24f
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/2.2.rst (GH-112366) (#114712)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-29 13:18:59 +00:00
Miss Islington (bot)
ee3ca96359
[3.11] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) (GH-114701)
(cherry picked from commit 1ac1b2f953)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-29 10:03:14 +00:00
Miss Islington (bot)
9fd8aaab83
[3.11] gh-101100: Fix sphinx warnings in Doc/c-api/memoryview.rst (GH-114669) (GH-114705)
(cherry picked from commit 97fb2480e4)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-29 10:02:52 +00:00
Miss Islington (bot)
a2c55c56d3
[3.11] gh-110893: Improve the documentation for __future__ module (GH-114642) (#114703)
gh-110893: Improve the documentation for __future__ module (GH-114642)

nedbat took issue with the phrasing "real module". I'm actually fine
with that phrasing, but I do think the `__future__` page should be clear
about the way in which the `__future__` module is special. (Yes, there
was a footnote linking to the future statements part of the reference,
but there should be upfront discussion).

I'm sympathetic to nedbat's claim that no one really cares about
`__future__._Feature`, so I've moved the interesting table up to the
top.
(cherry picked from commit 3b86891fd6)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-01-29 09:46:04 +00:00
Miss Islington (bot)
eff69a7bf9
[3.11] Correct Skip Montanaro's email address (GH-114677) (#114680)
Correct Skip Montanaro's email address (GH-114677)
(cherry picked from commit 5ecfd750b4)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2024-01-28 14:58:26 +00:00
Miss Islington (bot)
3a3e8731a4
[3.11] gh-114100: Remove superfluous writing to fd 1 in test_pty (GH-114647) (GH-114656)
(cherry picked from commit 7a470541e2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-27 19:30:11 +02:00
Nikita Sobolev
27ccb7e1ae
[3.11] gh-101100: Fix sphinx warnings in reference/import.rst (GH-114646) (#114654) 2024-01-27 09:37:13 -07:00
Hugo van Kemenade
e0964658d3
[3.11] gh-101100: Fix Sphinx warnings in whatsnew/3.11.rst and related (GH-114531) (#114650) 2024-01-27 07:57:33 -07:00
Miss Islington (bot)
21799488bc
[3.11] gh-113560: Improve docstrings for set.issubset() and set.issuperset() (GH-113562) (GH-114643)
(cherry picked from commit 11c582235d)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2024-01-27 11:21:24 +00:00
Miss Islington (bot)
8884a21417
[3.11] gh-101100: Fix sphinx warnings in library/email.mime.rst (GH-114635) (GH-114641)
(cherry picked from commit 6a8944acb6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-27 08:52:57 +00:00
Miss Islington (bot)
b323d99ac9
[3.11] Fix c-api/file.rst indexes (GH-114608) (GH-114639)
(cherry picked from commit 23fb9f0777)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-27 08:52:37 +00:00
Miss Islington (bot)
a3953cb9af
[3.11] gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891) (GH-114637)
(cherry picked from commit 926881dc10)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-27 08:02:34 +00:00
Miss Islington (bot)
dfef41a1d6
[3.11] Docs: rework the dbm.dumb introduction (GH-114550) (#114621)
(cherry picked from commit 6c2b419fb9)

- consistently use correct parameter markup
- consistently use submodule name as database name
- improve accuracy of the dbm.dumb.open() spec
- remove dumbdbm class refs and replace them with generic "database object"
- use parameter list for dbm.dumb.open()
(cherry picked from commit 6c2b419fb9)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-26 18:19:55 +00:00
Miss Islington (bot)
58e4d3b25e
[3.11] Document PyOS_strtoul and PyOS_strtol (GH-114048) (GH-114619)
(cherry picked from commit 3f62bf32ca)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-26 17:51:36 +00:00
Steve Dower
d7cbb04acb
Use Unicode unconditionally for _winapi.CreateFile (GH-114611)
Currently it switches based on build settings, but argument clinic does not handle it correctly.
2024-01-26 17:48:36 +00:00
Miss Islington (bot)
c09eae3e38
[3.11] gh-77749: Fix inconsistent behavior of non-ASCII handling in EmailPolicy.fold() (GH-6986) (GH-114607)
It now always encodes non-ASCII characters in headers if utf8 is false.

(cherry picked from commit 504334c7be)

Co-authored-by: Rito Takeuchi <licht-t@outlook.jp>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-26 18:30:50 +02:00
Miss Islington (bot)
c4a616352d
[3.11] Docs: mark up dbm.open() with param list (GH-114601) (#114605)
Also consolidate following paragraphs regarding database objects.

(cherry picked from commit 0bd8297a22)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-26 15:18:50 +00:00
Erlend E. Aasland
89015c528c
[3.11] Docs: reword dbm.ndbm introduction (#114549) (#114600)
(cherry picked from commit 4cf068ed08)

- add abbreviation directives for NDBM and GDBM
- consistently spell NDBM as NDBM
- silence broken ndbm class refs
- improve accuracy of dbm.ndbm.open() spec
- use replacement text for NDBM/GDBM file format incompatibility note
2024-01-26 13:56:52 +01:00
Miss Islington (bot)
7792d5af15
[3.11] Docs: fix versionchanged directives for dbm.open() and dbm.whichdb() (GH-114594) (#114596)
(cherry picked from commit 8710faeac2)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-26 12:43:22 +00:00
Miss Islington (bot)
87958e6aa3
[3.11] Docs: rework dbm introduction (GH-114551) (#114591)
- add refs to other parts of the docs (dict, bytes, etc.)
- clarify whichdb() return value by using list markup
- silence refs to example or generic submodule methods (keys, get, etc.)

(cherry picked from commit 65cf5dce11)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-26 10:24:05 +00:00
Erlend E. Aasland
938c7f716d
[3.11] Docs: reword dbm.gnu introduction (#114548) (#114589)
(cherry picked from commit 06c5de36f2)

Also...
- consistently spell GDBM as GDBM
- silence gdbm class refs
- improve accuracy of dbm.gdbm.open() spec
2024-01-26 10:15:34 +00:00
Miss Islington (bot)
170bf7951e
[3.11] gh-101100: Fix sphinx warnings in c-api/file.rst (GH-114546) (#114585)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-26 03:02:49 -07:00
Miss Islington (bot)
8cff807ae4
gh-114561: Mark some tests in test_wincosoleio with requires_resource('console') decorator (GH-114565)
(cherry picked from commit 33ae9895d4)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-01-25 20:14:18 +00:00
Miss Islington (bot)
709f17b7cc
[3.11] gh-77465: Increase test coverage for the numbers module (GH-111738) (GH-114557)
(cherry picked from commit e721adf4bd)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-25 14:49:46 +00:00
Miss Islington (bot)
279bbd2134
gh-100107: Make py.exe launcher ignore app aliases that launch Microsoft Store (GH-114358)
(cherry picked from commit d5c21c12c1)

Co-authored-by: Vincent Cunningham <flagrama@users.noreply.github.com>
2024-01-25 00:37:46 +00:00
Miss Islington (bot)
d7d3690af7
[3.11] gh-108731: Add description of __slots__ to MemberDescriptorType docs (GH-108745) (GH-114537)
(cherry picked from commit 6888cccac0)

Co-authored-by: plokmijnuhby <39633434+plokmijnuhby@users.noreply.github.com>
2024-01-24 20:05:12 +00:00
Miss Islington (bot)
94c5567e91
[3.11] Docs: mark up the FTP_TLS() docs with param list (GH-114510) (#114533)
Also turn sentence about prot_p() into a note.

(cherry picked from commit 6fadd68da5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-24 17:28:55 +01:00
Hugo van Kemenade
aa17d917e1
[3.11] gh-101100: Fix sphinx warnings in concurrent.futures.rst (GH-114521) (#114526)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-24 13:46:13 +00:00
Miss Islington (bot)
208db89fe6
[3.11] gh-101100: Fix sphinx warnings in asyncio-task.rst (GH-114469) (#114518)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-24 00:32:00 -07:00
Miss Islington (bot)
b39a314eda
[3.11] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249) (GH-114517)
(cherry picked from commit ce75b4c26d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-24 07:26:58 +00:00
Miss Islington (bot)
018b637a52
[3.11] Fix a typo in the contextlib documentation (GH-114507) (#114515) 2024-01-24 04:22:38 +00:00
Miss Islington (bot)
666d07f241
[3.11] gh-114492: Initialize struct termios before calling tcgetattr() (GH-114495) (GH-114503)
On Alpine Linux it could leave some field non-initialized.
(cherry picked from commit d22c066b80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-23 21:53:13 +00:00
Miss Islington (bot)
9344edeb75
[3.11] gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH-114269) (GH-114500)
The iterator returned by ElementTree.iterparse() may hold on to a file
descriptor. The reference cycle prevented prompt clean-up of the file
descriptor if the returned iterator was not exhausted.
(cherry picked from commit ce01ab536f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-01-23 20:49:13 +00:00
Miss Islington (bot)
e85f4c6fa9
[3.11] Docs: use placeholders in dbm flag param docs (GH-114482) (#114498)
Also correct the default flag param for dbm.dumb.open();
it's 'c', not 'r'.
(cherry picked from commit 8c265408c5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-23 21:05:39 +01:00
Miss Islington (bot)
8790e5799a
[3.11] Docs: mark up FTP.connect() and FTP.login() with param lists (GH-114395) (#114486)
Use rst substitutions to reduce raw text duplication.

(cherry picked from commit 01105c7c4f)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-23 14:03:51 +00:00
Miss Islington (bot)
ec71690fcc
[3.11] Docs: mark up FTP.retrbinary and FTP.storbinary with param lists (GH-114399) (#114484)
(cherry picked from commit 5277d4c7db)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-01-23 14:00:35 +00:00
Miss Islington (bot)
b62db465e5
[3.11] gh-101100: Fix sphinx warnings in Doc/library/locale.rst (GH-114425) (#114478)
gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` (GH-114425)

* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst`

* Remove `/` from signatures
(cherry picked from commit 7d21cae964)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-23 13:24:51 +02:00
Erlend E. Aasland
eb94a0426f
[3.11] Docs: align usage of versionadded/versionchanged with recommended practice (#114409) (#114473)
(cherry picked from commit 1d7bddd961)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-01-23 10:39:25 +01:00
Miss Islington (bot)
1f04ac8e27
[3.11] GH-105900: Fix pathlib.Path.symlink_to(target_is_directory=...) docs (GH-114035) (#114465)
Clarify that *target_is_directory* only matters if the target doesn't
exist.
(cherry picked from commit b822b85ac1)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-01-23 05:37:32 +00:00
Miss Islington (bot)
9d2ad6f24a
[3.11] GH-82695: Clarify pathlib.Path.mkdir() documentation (GH-114032) (#114463)
Remove a double negative in the documentation of `mkdir()`'s *exist_ok*
parameter.

(cherry picked from commit 32c227470a)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-23 02:37:55 +00:00
Barney Gale
20f3669ac2
[3.11] GH-99334: Explain that PurePath.is_relative_to() is purely lexical. (GH-114031) (#114461)
(cherry picked from commit 3a61d24062)
2024-01-23 01:16:21 +00:00
Miss Islington (bot)
dcda3aaa6a
[3.11] gh-66944: Note that the contextlib.closing example is for illustrative purposes (GH-112198) (#114459) 2024-01-23 01:07:14 +00:00
Miss Islington (bot)
f5d9980217
[3.11] gh-114257: Ignore the FileNotFound error in ctypes.util._is_elf() (GH-114394) (GH-114445)
(cherry picked from commit 7fc51c3f6b)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-01-22 18:10:44 +00:00
Miss Islington (bot)
acea9d8e87
[3.11] gh-75128: Ignore EADDRNOTAVAIL error in asyncio.BaseEventLoop.create_server() (GH-114420) (GH-114442)
(cherry picked from commit a53e56e7d8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2024-01-22 17:20:01 +00:00
Miss Islington (bot)
5b12f7d2bd
[3.11] gh-114275: Skip doctests that use asyncio in test_pdb for WASI builds (GH-114309) (#114438)
gh-114275: Skip doctests that use `asyncio` in `test_pdb` for WASI builds (GH-114309)
(cherry picked from commit efb81a60f5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-01-22 18:02:16 +01:00
Miss Islington (bot)
350b4c7c0c
[3.11] gh-101100: Fix Sphinx warnings in reference/expressions.rst (GH-114194) (#114437)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-22 18:50:28 +02:00
Miss Islington (bot)
804037ee4a
[3.11] gh-111803: Make test_deep_nesting from test_plistlib more strict (GH-114026) (GH-114407)
It is no longer silently passed if RecursionError was raised for low
recursion depth.
(cherry picked from commit db1c18eb62)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-22 15:31:21 +00:00
Serhiy Storchaka
a0f30b04fe
[3.11] gh-102512: Turn _DummyThread into _MainThread after os.fork() called from a foreign thread (GH-113261) (GH-114431)
Always set a _MainThread as a main thread after os.fork() is called from
a thread started not by the threading module.

A new _MainThread was already set as a new main thread after fork if
threading.current_thread() was not called for a foreign thread before fork.
Now, if it was called before fork, the implicitly created _DummyThread will
be turned into _MainThread after fork.

It fixes, in particularly, an incompatibility of _DummyThread with
the threading shutdown logic which relies on the main thread
having tstate_lock.

(cherry picked from commit 49785b06de)

Co-authored-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2024-01-22 15:00:33 +00:00