Commit graph

109386 commits

Author SHA1 Message Date
Miss Islington (bot)
636832fb2a
Remove duplicate explanation (GH-91534)
(cherry picked from commit 0e6dca0193)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
2022-04-17 21:48:36 -07:00
Miss Islington (bot)
3537d897e0
gh-89885: Improve import example in language reference (GH-91523) (#91649)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit d5a69571f5)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-17 14:51:19 -07:00
Miss Islington (bot)
c6c9823455
gh-91541: Fix error in example in modules tutorial (GH-91634)
(cherry picked from commit efbc668183)

Co-authored-by: 180909 <734461790@qq.com>
2022-04-17 14:40:14 -07:00
Miss Islington (bot)
833ff16430
gh-90923: Improve sqlite3.Connection.execute* docs (GH-91643)
- Drop 'nonstandard'; it does not add any value
- Try to be more concise
- Make return value a little more explicit
(cherry picked from commit 017f07a229)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-04-17 14:36:32 -07:00
Gregory P. Smith
2a43afdba9
[3.9] [3.10] gh-91607: Fix several test_concurrent_futures tests to actually test what they claim (GH-91600) (GH-91612) (#91617)
* Fix test_concurrent_futures to actually test what it says.

Many ProcessPoolExecutor based tests were ignoring the mp_context
and using the default instead.  This meant we lacked proper test
coverage of all of them.

Also removes the old _prime_executor() worker delay seeding code
as it appears to have no point and causes 20-30 seconds extra
latency on this already long test.  It also interfered with some
of the refactoring to fix the above to not needlessly create their
own executor when setUp has already created an appropriate one.

* Don't import the name from multiprocessing directly to avoid confusion.

(cherry picked from commit 7fa3a5a219)
(cherry picked from commit 9a458934f7)
2022-04-16 22:47:41 -07:00
Miss Islington (bot)
c171d757f3
gh-91595: fix the comparison of character and integer by using ord() (GH-91596)
* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d729)

Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
2022-04-16 07:57:07 -07:00
Miss Islington (bot)
514162b835
gh-82849: revise intro to os.path.rst (GH-32232)
* revise the first paragraph of docs for os.path
* add a mention of `os.PathLike` protocol
* remove warnings rendered irrelevant by :pep:`383` and :pep:`529`

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

Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
2022-04-15 21:42:20 -07:00
Miss Islington (bot)
e0fc81ced9
Add link to documentation translation list (GH-91560) (#91588)
(cherry picked from commit c4e8a93eb3)

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

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-16 04:15:03 +02:00
Miss Islington (bot)
2c034700f8
bpo-40376: slightly improved the wording for os.getgrouplist (GH-19702) (GH-91557)
The documentation for os.getgrouplist potentially read like it
returned all groups a user belongs to but it potentially doesn't.

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

Co-authored-by: Jens Holzkämper <jens@holzkaemper.berlin>
2022-04-15 15:08:11 +02:00
Miss Islington (bot)
b32d12495c
gh-70979: Fix runpy.run_path parameter name in docs (GH-32265)
Noticed while reviewing GH-30729.
(cherry picked from commit f1e989b045)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-14 18:27:45 -07:00
Miss Islington (bot)
35ce2b771b
Add redirects to Misc/NEWS bpo links (GH-91454) (GH-91536)
(cherry picked from commit 17dbb6bc10)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-04-14 17:01:15 +02:00
Miss Islington (bot)
f3f5d4be7a
gh-90879: Fix missing parameter for put_nowait() (GH-91514)
(cherry picked from commit 0fc3517cf4)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-14 02:23:15 -07:00
Miss Islington (bot)
0ab5e83ff7
gh-87497: Document that urllib.request sends headers in camel case (GH-24661)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 325d6f5035)

Co-authored-by: Alix Lourme <alix.lourme@gmail.com>
2022-04-13 19:45:56 -07:00
Miss Islington (bot)
edf1a77f23
gh-91421: Use constant value check during runtime (GH-91422) (GH-91493)
The left-hand side expression of the if-check can be converted to a
constant by the compiler, but the addition on the right-hand side is
performed during runtime.

Move the addition from the right-hand side to the left-hand side by
turning it into a subtraction there. Since the values are known to
be large enough to not turn negative, this is a safe operation.

Prevents a very unlikely integer overflow on 32 bit systems.

Fixes GH-91421.
(cherry picked from commit 0859368335)

Co-authored-by: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
2022-04-13 18:38:55 -07:00
Miss Islington (bot)
a8d245a675
gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434) (GH-91465)
* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly
(cherry picked from commit f33e2c87a8)

Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
2022-04-12 19:58:02 -07:00
Miss Islington (bot)
4cc4fe2789
[3.9] GH-89074: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765) (#91471)
(cherry picked from commit 2cb1a6806c)

Co-authored-by: Bar Harel <bar.harel@biocatch.com>
2022-04-11 23:14:43 -05:00
Miss Islington (bot)
8cd0f27492
pickle docs: Fix typos and improve wording (GH-24776) (GH-32396)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 1d0f08fa46)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2022-04-07 18:56:29 -07:00
Steve Dower
80c115385c
bpo-47103: Copy pgort140.dll into output directory when building PGInstrument on Windows (GH-32083) 2022-04-08 01:02:58 +01:00
Miss Islington (bot)
8b358d4147
ssl docs: Fix typo (GH-32336)
(cherry picked from commit 9ee2d3a939)

Co-authored-by: Frederick <fmoor@users.noreply.github.com>
2022-04-07 10:06:54 -07:00
Miss Islington (bot)
b124a3913d
c-api docs: There are five fields, not four (GH-32379)
(cherry picked from commit 4c92427fb8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-07 07:32:09 -07:00
Miss Islington (bot)
85f0792b8f
doc: Link to string.capwords from str.title (GH-20913)
Since `title()` mentions its own short-comings, it should also mention the library function which does not possess them.

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

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
2022-04-06 18:57:38 -07:00
Miss Islington (bot)
ea6dc5ec08
pkgutil docs: Link sys constants, add backticks (GH-32356)
Co-authored-by: Éric <merwok@netwok.org>
(cherry picked from commit 63bd72448a)

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>
2022-04-06 18:18:56 -07:00
Miss Islington (bot)
30dfc46be4
ssl docs: Fix typo (GH-32314)
(cherry picked from commit 1da9c38fd3)

Co-authored-by: Frederick <fmoor@users.noreply.github.com>
2022-04-06 18:16:53 -07:00
Ken Jin
d6a7ee69fb
[3.9] bpo-46769: Fix backticks in typing.rst to appease rstlint (GH-32375)
* Use double backticks to appease rstlint

* Update susp-ignored.csv
2022-04-07 02:03:11 +08:00
Ken Jin
1ab53511e9
Fix whitespace/indentation issues in test_sys (GH-32369) (GH-32373)
(cherry picked from commit da922409ac)
2022-04-07 01:11:07 +08:00
Miss Islington (bot)
b5b3b9151c
stdtypes docs: fix typo (GH-32349)
(cherry picked from commit b33c4564ac)

Co-authored-by: Ian <40774387+isteptoe@users.noreply.github.com>
2022-04-06 09:04:38 -07:00
Miss Islington (bot)
770780e63e
bpo-47235: Note where a typo is intentional in code. (GH-32348)
People keep popping up reporting these as typos in the docs despite
being described as typos in the surrounding text.  Hopefully a comment
on the line itself makes it more obvious?

Arguably some of the typo examples are not using the "right" typo as the
"assret" one in particular is now detected by default due to how common
it was in actual code.  But I don't want to to typo chasing by changing
these examples to be other not yet auto-detected typos as they still
illustrate the point well enough.
(cherry picked from commit ac1fb07b6e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-04-06 08:32:16 -07:00
Jeremy Kloth
a4c7752f3e
bpo-47230: Silence compiler warnings on Windows from zlib 1.2.12 (GH-32337)
(cherry picked from commit 944f09adfc)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2022-04-06 00:37:16 +01:00
Jelle Zijlstra
d1fb16ae28
[3.9] bpo-45790: List macros in same order in which fields are described (GH-29529) (GH-32321)
Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>

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

Co-authored-by: rtobar <rtobar@icrar.org>
2022-04-04 22:28:21 -07:00
Miss Islington (bot)
bc9ec24290
bpo-40982: shutil docs: Remove outdated copytree() example (GH-24778)
It is not preferable to keep a copy of the implementation in the
docs.
(cherry picked from commit e06f920c5b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-04-04 20:22:04 -07:00
Miss Islington (bot)
c1984f39c5
crypt docs: Fix references to methods attr (GH-26806)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit cae0f5d3da)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-04-04 20:15:30 -07:00
Miss Islington (bot)
31c9e35e53
bpo-32658: Regex docs: Fix metacharacter reference (GH-32230)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 43571a3eea)

Co-authored-by: Mike cm <mikecmcleod@gmail.com>
2022-04-04 20:11:36 -07:00
Miss Islington (bot)
c0063bdc7b
bpo-47007: [doc] str special method lookup (GH-31863)
Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

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

Co-authored-by: Vanshaj Singhania <8797467+itsvs@users.noreply.github.com>
2022-04-04 19:59:04 -07:00
Miss Islington (bot)
e47e6ffed3
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
Co-authored-by: Andrew Kuchling <amk@amk.ca>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a74892cb21)

Co-authored-by: yyyyyyyan <24644216+yyyyyyyan@users.noreply.github.com>
2022-04-04 19:30:25 -07:00
Miss Islington (bot)
5b4bc61d89
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)
(cherry picked from commit 48269ea9fd)

Co-authored-by: 180909 <734461790@qq.com>
2022-04-04 10:41:50 -07:00
Miss Islington (bot)
a8f29b887e
Demonstrate py --list in the quickstart section of the Windows doc page (GH-29383)
(cherry picked from commit 1ecfe3d5ae)

Co-authored-by: Christian Clauss <cclauss@me.com>
2022-04-04 09:02:23 -07:00
Miss Islington (bot)
0d0a6f18a0
Follow PEP-8 guidelines in tutorial for standard library (GH-26127)
(cherry picked from commit 6db2db91b9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2022-04-03 15:58:21 -07:00
Miss Islington (bot)
490ccbd6e0
bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285)
(cherry picked from commit b82cdd1dac)

Co-authored-by: Christian Heimes <christian@python.org>
2022-04-03 08:30:39 -07:00
Miss Islington (bot)
b5092350b2
Language reference: Remove duplicated text about iterable unpacking (GH-25212)
(cherry picked from commit 4f5d56f8f3)

Co-authored-by: Jiashuo Li <4003950+jiasli@users.noreply.github.com>
2022-04-02 20:06:54 -07:00
Miss Islington (bot)
f4e280d8c5
bpo-24563: Link encoding names to encoding declarations (GH-32274)
(cherry picked from commit 01be5d6446)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-04-02 17:40:31 -07:00
Jelle Zijlstra
6eff004b96
[3.9] More minor fixes to C API docs (GH-31525) (GH-32259)
* wording fixes in type.rst

* grammar and punctuation in sys.rst

* set: grammar fixes

* structures: capitalization fix

* grammar fixes for sequence

* objects: point to Py_TYPE instead of direct object access

* numbers: add more explicit Python equivalences

* method: add missing period

* memory: grammar fix

* mapping: grammar fixes

* long: grammar fix

* iter: fix grammar for PyAIter_Check

* init: grammar fix.
(cherry picked from commit 897bc6f928)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-02 16:00:36 -07:00
Jelle Zijlstra
74138ac954
[3.9] More minor fixes to C API docs (GH-31714) (GH-32260)
* init_config: wording fixes

* bytearray: remove XXX, there is a good link to the buffer docs

* bytes, call, exceptions: minor wording fixes.
(cherry picked from commit 677a879466)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-02 16:00:13 -07:00
Jelle Zijlstra
62da258a45
[3.9] Document func parameter of locale.atof (GH-18183) (GH-32261)
The second parameter (named `func`) has been present since the `locale`
module was introduced in eef1d4e8b1, but has never been documented.

This commit updates the documentation for `locale.atof` to clarify the
behavior of the function and how the `func` parameter is used.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>.
(cherry picked from commit 208da6d508)

Co-authored-by: Kevin Locke <kevin@kevinlocke.name>
2022-04-02 15:59:57 -07:00
Miss Islington (bot)
694425817b
bpo-45584: Clarify math.trunc documentation (GH-29183)
While floor/ceil 's documentation are very precise, `truncate` was not explained. I actually had to search online to understand the difference between `truncate` and `floor` (admittedly, once I remembered that numbers are signed, and that floating numbers actually uses a bit for negation symbol instead of two complement, it became obvious)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ebbdbbff5d)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2022-04-02 15:36:33 -07:00
Miss Islington (bot)
bf0f04f871
codecs docs: fix grammar mistake (GH-29462)
(cherry picked from commit ea56845744)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-04-02 14:34:18 -07:00
Miss Islington (bot)
dc9322a91d
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
(cherry picked from commit c93a0ac697)

Co-authored-by: 180909 <wjh180909@gmail.com>
2022-04-02 14:21:45 -07:00
Miss Islington (bot)
5b80031fb0
bpo-47031: Improve documentation for math.nan (GH-32170)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 182e93c3f5)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2022-04-02 13:23:26 -07:00
Miss Islington (bot)
0f0f85e9d8
bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 (GH-32241)
(cherry picked from commit 6066739ff7)

Co-authored-by: Zachary Ware <zach@python.org>
2022-04-02 06:37:39 -07:00
Jeremy Kloth
306a93b481
[3.9] bpo-47089: Avoid test_compileall failures on Windows (GH-32037). (GH-32240)
* [3.9] bpo-47089: Avoid test_compileall failures on Windows (GH-32037).
(cherry picked from commit 76b8a075b8)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2022-04-02 03:40:27 +02:00
Miss Islington (bot)
98d57737de
bpo-14911: Corrected generator.throw() documentation (GH-32207)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8be7c2bc5a)

Co-authored-by: Dave Goncalves <davegoncalves@gmail.com>
2022-03-31 07:24:39 -07:00