Commit graph

111367 commits

Author SHA1 Message Date
Jelle Zijlstra
4674b315e5
[3.10] gh-92112: Fix crash triggered by an evil custom mro() (GH-92113) (#92370)
(cherry picked from commit 85354ed78c)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2022-05-06 21:01:23 -07:00
Miss Islington (bot)
17f3b5cbfa
gh-92368: Fix missing possessive apostrophe (GH-92397)
* Fix missing possessive apostrophe
(cherry picked from commit a79001ee16)

Co-authored-by: gophra <105054704+gophra@users.noreply.github.com>
2022-05-06 07:12:59 -07:00
Miss Islington (bot)
229dc17f7a
gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (GH-92048) (#92330)
(cherry picked from commit 43b135f94e)

Co-authored-by: Robert Howlett <robert@howletts.org.uk>

Co-authored-by: Robert Howlett <robert@howletts.org.uk>
2022-05-06 14:47:09 +02:00
Miss Islington (bot)
b5f5993dfe
Add source for character mappings (GH-92014) (#92389)
(cherry picked from commit d707d073be)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-06 12:58:16 +02:00
Miss Islington (bot)
367faf71ea
Document the lifetime of PyUnicode_AsUTF8String (GH-92325)
The current wording implied this, but didn't state it explicitly.
(cherry picked from commit 740da8d37a)

Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2022-05-06 02:55:01 -07:00
Miss Islington (bot)
3db0e0b9f7
NEWS: Reorder items by section (GH-92373)
They caused duplicated sections.
(cherry picked from commit 9b491ae04c)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-05-05 22:15:53 -07:00
Miss Islington (bot)
0eef443f01
Issues/88027: A potential double free in list_sort_impl (GH-92367)
merge_freemem(): set keys to NULL do it's harmless to call this again.
(cherry picked from commit 9652900969)

Co-authored-by: Tim Peters <tim.peters@gmail.com>
2022-05-05 21:38:14 -07:00
Erlend Egeberg Aasland
2a2421e538
[3.10] gh-80254: Disallow recursive usage of cursors in sqlite3 converters (#92274)
* [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054)

(cherry picked from commit f629dcfe83)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

* Fix ref leak in pysqlite_cursor_iternext
2022-05-05 12:46:21 -07:00
Miss Islington (bot)
9b47252d54
[3.10] gh-92118: Add test for traceback when exception is modified by (Async)ExitStack.__exit__ (GH-92339) (GH-92343) 2022-05-05 18:47:59 +01:00
Miss Islington (bot)
bb2dcf1c79
gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (GH-92224)
(cherry picked from commit d1b2e989be)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2022-05-04 17:30:54 -07:00
Miss Islington (bot)
178a238f25
gh-92036: Fix gc_fini_untrack() (GH-92037)
Fix a crash in subinterpreters related to the garbage collector. When
a subinterpreter is deleted, untrack all objects tracked by its GC.
To prevent a crash in deallocator functions expecting objects to be
tracked by the GC, leak a strong reference to these objects on
purpose, so they are never deleted and their deallocator functions
are not called.
(cherry picked from commit 14243369b5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-04 03:23:29 -07:00
Miss Islington (bot)
28eea73e7c
bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and explicit close (GH-31913)
(cherry picked from commit dfb1b9da8a)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-05-03 17:16:21 -07:00
Jelle Zijlstra
31d9a88ca8
[3.10] Improve the typing docs (GH-92264) (#92270)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 27e3665715)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-03 16:41:39 -06:00
Miss Islington (bot)
666820cb4b
gh-87304: Improve comments in language reference for imports (GH-92164)
(cherry picked from commit ee2205b208)

Co-authored-by: Robert Yang <35813883+robert861212@users.noreply.github.com>
2022-05-03 15:24:03 -07:00
Miss Islington (bot)
30681d6655
bpo-29890: Test IPv*Interface construction with tuple argument (GH-30862)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b295a92c50)

Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
2022-05-03 11:18:31 -07:00
Miss Islington (bot)
58f2d2d10a
bpo-46604: fix function name in ssl module docstring (GH-31064)
The function fetch_server_certificate is replaced by get_server_certificate in the module. I reflected the change in the module docstrings.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit feca9bbd1f)

Co-authored-by: Kossi GLOKPOR <83467320+glk0@users.noreply.github.com>
2022-05-03 09:24:39 -07:00
Miss Islington (bot)
5f709bdb86
bpo-46415: Use f-string for ValueError in ipaddress.ip_{address,network,interface} helper functions (GH-30642)
`IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of
(address description, netmask) as the address parameter.
When the tuple-based address is used errors are not propagated
correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments:

	In [7]: ipaddress.ip_network(("192.168.100.0", "fooo"))
        ...
	TypeError: not all arguments converted during string formatting

Compared to:

	In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo"))
        ...
	NetmaskValueError: 'foo' is not a valid netmask

Use an f-string to make sure the error is always properly formatted.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 52dc9c3066)

Co-authored-by: Thomas Cellerier <thomascellerier@gmail.com>
2022-05-03 05:37:17 -07:00
Serhiy Storchaka
62ddbbcfaf
[3.10] gh-91583: AC: Fix regression for functions with defining_class (GH-91739) (GH-92079)
Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
(cherry picked from commit a055dac0b4)
2022-05-03 11:53:46 +03:00
Miss Islington (bot)
adc06cd2d7
gh-92106: Add test that subscription works on arbitrary TypedDicts (GH-92176)
(cherry picked from commit 81fb3548be)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-05-02 17:39:07 -07:00
Miss Islington (bot)
5f40cb85c2
bpo-46586: Fix more erroneous doc links to builtins (GH-31429)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
(cherry picked from commit cc6ae4f483)

Co-authored-by: Meer Suri <46469858+meersuri@users.noreply.github.com>
2022-05-02 15:51:33 -07:00
Miss Islington (bot)
c467812bc0
bpo-46787: Fix ProcessPoolExecutor exception memory leak (GH-31408) (GH-31408)
Do not store `ProcessPoolExecutor` work item exception traceback that prevents
exception frame locals from being garbage collected.
(cherry picked from commit 9c204b148f)

Co-authored-by: themylogin <themylogin@gmail.com>
2022-05-02 15:45:22 -07:00
Miss Islington (bot)
f44e629a57
bpo-6686: Replace String with Bytes in xml.sax.handler documentation (GH-30612)
(cherry picked from commit 32e4f450af)

Co-authored-by: Yassir Karroum <ukarroum17@gmail.com>
2022-05-02 15:44:07 -07:00
Miss Islington (bot)
d851f37b88
importlib docs: Update importlib.abc hierarchy (GH-31113)
Fixed some inconsistencies in the text about relationships
(cherry picked from commit 5f45a9d3c3)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-05-02 13:48:59 -07:00
Thaddeus1499
c8ab1633fc
[3.10] bpo-43504: Remove effbot urls (GH-26308) (#92161)
* [3.10] Remove effbot urls (GH-26308).
(cherry picked from commit e9f66aedf4)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2022-05-02 12:21:51 -06:00
Miss Islington (bot)
bab4d0bb16
gh-91783: Document security considerations for shutil.unpack_archive (GH-91844)
(cherry picked from commit 4b297a9ffd)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-05-02 10:34:59 -07:00
Miss Islington (bot)
864058ba86
[3.10] Fix typo in Programming FAQ (GH-92083) (GH-92148)
I believe the word "with" was missing here.
(cherry picked from commit 2a7efa3242)


Co-authored-by: Matt Harding <majaharding@gmail.com>
2022-05-02 10:24:49 -07:00
Miss Islington (bot)
0e9927b6b0
gh-92082: contextlib docs: Change aclosing from a class to a function for consistency (GH-92155)
Signed-off-by: prwatson <prwatson@redhat.com>
(cherry picked from commit 958f21c5cd)

Co-authored-by: Thaddeus1499 <104600742+Thaddeus1499@users.noreply.github.com>
2022-05-02 09:37:10 -07:00
Erlend Egeberg Aasland
178d79ae67
[3.10] gh-89301: Fix regression with bound values in traced SQLite statements (#92147)
(cherry picked from commit 721aa96540)
2022-05-02 10:21:13 -06:00
Jelle Zijlstra
6712022447
[3.10] build(deps): bump actions/cache from 3.0.1 to 3.0.2 (GH-92111) (#92124)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>.
(cherry picked from commit eefe6911f4)
2022-05-02 10:07:03 -06:00
Miss Islington (bot)
ac508276dc
concurrent.futures: Fix typo in docstring (GH-92121)
(cherry picked from commit b11243e85e)

Co-authored-by: Yiannis Hadjicharalambous <hadjicharalambous.yiannis@gmail.com>
2022-05-02 09:06:43 -07:00
Miss Islington (bot)
446cc03730
gh-88546: glob.glob docs: Make new paragraph for emphasis and reordered sentence (GH-91614)
(cherry picked from commit b9ab6cea08)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-02 08:35:37 -07:00
Miss Islington (bot)
9941640041
asyncio.subprocess: Fix a typo in doc (GH-92030)
Remove a confusion for read method in asyncio-subprocess doc for stderr StreamReader instance
(cherry picked from commit bb857a96ef)

Co-authored-by: Harsh <65716674+Harsh-br0@users.noreply.github.com>
2022-05-02 08:18:01 -07:00
Miss Islington (bot)
9ce39cc9f2
gh-85133: os docs: Add that getenv uses os.environ (GH-91874)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b25352a5c0)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-02 07:58:09 -07:00
Miss Islington (bot)
bba721d0fa
gh-84714: Add behavior if dst file exists (GH-91867)
(cherry picked from commit 9166ace805)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-02 07:51:07 -07:00
Miss Islington (bot)
d985c8e2e0
bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)
If the error handler returns position less or equal than the starting
position of non-encodable characters, most of built-in encoders didn't
properly re-size the output buffer. This led to out-of-bounds writes,
and segfaults.
(cherry picked from commit 18b07d773e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-05-02 02:58:41 -07:00
Miss Islington (bot)
a7d3de7fe6
gh-85679: Recommend encoding="utf-8" in tutorial (GH-91778)
(cherry picked from commit 614420df97)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-05-02 01:45:10 -07:00
Jelle Zijlstra
1fd3ab7c28
[3.10] build(deps): bump actions/stale from 4 to 5 (GH-92108) (#92127)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>.
(cherry picked from commit 34129f7c42)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-01 17:46:06 -06:00
Gregory P. Smith
ea1eba03e7
[3.10] gh-91401: Conservative backport of subprocess._USE_VFORK (#91932)
This does not alter the `_posixsubprocess.fork_exec()` private API to
avoid issues for anyone relying on that (bad idea) or for anyone who's
`subprocess.py` and `_posixsubprocess.so` upgrades may not become
visible to existing Python 3.10 processes at the same time.

Backports the concept of cd5726fe67.

Provides a fail-safe way to disable vfork for #91401.

I didn't backport the documentation as I don't actually expect this to be used and `.. versionadded: 3.10.5` always looks weird in docs. It's being done more to have a fail-safe in place for people just in case.
2022-05-01 16:09:50 -07:00
Miss Islington (bot)
e7de543219
typing docs: Add example for async functions (GH-20386)
Fixes python/typingGH-424
(cherry picked from commit 9588f880a2)

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
2022-04-30 21:55:58 -07:00
Miss Islington (bot)
a48d31f204
gh-81488: Add recursive wording for issubclass docs (GH-92087)
(cherry picked from commit 1066ecb970)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 21:21:51 -07:00
Miss Islington (bot)
31e35bef22
gh-91611: Use example.com for documentation, not mydomain.com (GH-91613)
example.com is reserved by the IANA as special-use domain name for documentation
purposes. The domain names are used widely in books, tutorials, sample network
configurations, and generally as examples for the use of domain name.

On the other hand, mydomain.com is real Domain Name Registration service.
(cherry picked from commit ea39246782)

Co-authored-by: Motoki Naruse <motoki@naru.se>
2022-04-30 21:03:11 -07:00
Miss Islington (bot)
8b6e5d3863
gh-89253: Add 3.10 whatsnew section for itertools.pairwise (GH-91563)
GH-89253

[`pairwise()`](https://docs.python.org/3/library/itertools.htmlGH-itertools.pairwise) already has the 'new in python3.10'

Automerge-Triggered-By: GH:rhettinger
(cherry picked from commit 5dcfb916c7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 15:29:09 -07:00
Miss Islington (bot)
335aae1950
gh-87801: Add run() to subprocess.CalledProcessError description (GH-91628)
(cherry picked from commit 567be058b4)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 14:51:45 -07:00
Miss Islington (bot)
cfcda0acf2
gh-87192: Update wording for fcntl 'Changed in' (GH-91658)
(cherry picked from commit d7eb1ffbe8)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 14:44:08 -07:00
Miss Islington (bot)
5ed9556cfb
gh-85864: io docs: Add missing position-only parameters (GH-91950)
(cherry picked from commit 3a8e2b6e65)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 08:39:29 -07:00
Serhiy Storchaka
e8ff3c92f6
[3.10] gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070) (GH-92073)
Previously, pickling did not fail, but the result could not be unpickled.
(cherry picked from commit 6d0d547033)
2022-04-30 15:33:39 +03:00
Miss Islington (bot)
19a079690c
bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)
It was raised if the charset itself contains characters not encodable
in UTF-8 (in particular \udcxx characters representing non-decodable
bytes in the source).
(cherry picked from commit e91dee87ed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-30 05:31:28 -07:00
Miss Islington (bot)
7149b21c2e
sorting howto: Add clarification on < using __lt__ (GH-92010)
(cherry picked from commit 53ca774497)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-29 15:25:31 -07:00
Miss Islington (bot)
7bd4411b90
bpo-26792: Improve docstrings of runpy module run_functions (GH-30729)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 117836f123)

Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
2022-04-29 11:45:43 -07:00
Miss Islington (bot)
11652ceccf
gh-91832: Add 'required' attr to argparse.Action repr (GH-91841)
GH- Adding 'required' to names in Lib.argparse.Action

gh-91832:
Added 'required' to the list `names` in `Lib.argparse.Action`.
Changed constant strings that test the Action object.

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4ed3900041)

Co-authored-by: Abhigyan Bose <abhigyandeepbose@gmail.com>
2022-04-28 08:27:17 -07:00