Commit graph

111355 commits

Author SHA1 Message Date
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
Miss Islington (bot)
e25799d27d
Add note that headers added via urllib.request.add_header are added to redirected requests (GH-30708) (#92004)
(cherry picked from commit f348154c8f)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
2022-04-27 16:26:42 -06:00
Miss Islington (bot)
e2514cb77f
Correct method name typo (GH-91970)
(cherry picked from commit c6b84a727c)

Co-authored-by: Simon de Vlieger <cmdr@supakeen.com>
2022-04-27 15:19:43 -07:00
Miss Islington (bot)
86e4bdaf49
gh-84459: Make wording more specific for Path.replace (GH-91853)
GH-84459
(cherry picked from commit 161dff7e10)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-27 15:18:06 -07:00
Miss Islington (bot)
777d478d12
gh-91810: Expand ElementTree.write() tests to use non-ASCII data (GH-91989)
(cherry picked from commit f60b4c3d74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-27 09:50:25 -07:00
Victor Stinner
a36d97e3f1
gh-68966: Document mailcap deprecation in Python 3.11 (#91971)
(cherry picked from commit 80de0273c0)
2022-04-27 11:39:51 +02:00
Miss Islington (bot)
280749a8fd
Fix missing f prefix on f-strings (GH-91910)
(cherry picked from commit f882d33778)

Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
2022-04-27 00:08:05 -07:00
Serhiy Storchaka
dbe666d398
[3.10] gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918). (GH-91946)
(cherry picked from commit 36306cf786)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-26 10:50:22 +03:00
Miss Islington (bot)
3e219d3123
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
(cherry picked from commit f41c16bf51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-25 22:57:57 -07:00
Miss Islington (bot)
79712c9d2e
gh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)
If use a non-builtin codec, partially implemented in Python
(e.g. ISO-8859-15), a new RecursionError (with empty error message)
can be raised while handle a RecursionError.

Testing for error message was needed to distinguish
a recursion error from arbitrary RuntimeError. After introducing
RecursionError, it became unnecessary.
(cherry picked from commit a568585069)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-25 22:26:47 -07:00
Ezio Melotti
4120bbae49
[3.10] gh-91888: add a :gh: role to the documentation (GH-91889) (#91934)
* gh-91888: Add a :gh: role to the documentation (GH-91889).

* [3.10] gh-91888: add a `:gh:` role to the documentation (GH-91889)

* Add a new :gh:`...` role for GitHub issues.

* Fix a GitHub id to use the :gh: role.

* Add Misc/NEWS entry.

* Refactoring and rephrasing.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>.
(cherry picked from commit f7641a2ffe)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-04-26 02:51:28 +02:00
Miss Islington (bot)
971343eb56
gh-91904: Fix setting envvar PYTHONREGRTEST_UNICODE_GUARD (GH-91905)
It always failed on non-UTF-8 locale and prevented running regrtests.
(cherry picked from commit 54d068adfb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-04-25 08:03:47 -07:00
Ezio Melotti
dc31334ab1
[3.10] Update Sphinx bpo role to use redirect URI. (#91890)
* Update Sphinx bpo role to use redirect URI. (GH-32342)

* [3.10] Update Sphinx bpo role to use redirect URI. (GH-32342).
(cherry picked from commit 08cfe07950)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Fix whitespace.
2022-04-24 23:07:51 +02:00