Commit Graph

10268 Commits

Author SHA1 Message Date
Miss Islington (bot) a77b1f6b5b
bpo-41228: Fix /a/are/ in monthcalendar() descripton (GH-21372)
(cherry picked from commit 344dce312a)

Co-authored-by: Nima Dini <nima.dini@gmail.com>
2020-07-10 19:07:37 -07:00
Miss Islington (bot) 3daf0017de
Fix typo in docs: 'created by th' -> 'created by the' (GH-21384)
(cherry picked from commit 6fc732a211)

Co-authored-by: marload <rladhkstn8@gmail.com>
2020-07-10 08:50:45 -07:00
Miss Islington (bot) fd27fb7f3d
bpo-37765: Add keywords to IDLE tab completions (GH-15138)
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.

Rewrite Completions doc.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit bce2eb4646)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-09 15:54:14 -07:00
Miss Islington (bot) b4beda1a86
bpo-41199: Docstring convention not followed for dataclasses documentation page (GH-21413)
Automerge-Triggered-By: @ericvsmith
(cherry picked from commit 61bb24a270)

Co-authored-by: marload <rladhkstn8@gmail.com>
2020-07-09 05:20:26 -07:00
Miss Islington (bot) 1cbcf9833f
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
(cherry picked from commit b40e434386)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-03 21:05:41 -07:00
Miss Islington (bot) df59293bf0
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() (GH-20874)
(cherry picked from commit 004e64e805)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2020-07-01 21:06:51 -07:00
Pablo Galindo 6e39999a24
[3.9] bpo-38870: Extend subject of ast.unparse warnings (GH-21053) (GH-21191)
- Mention that some compiler optimizations might not roundtrip
exactly (such as constant tuples and frozensets).

- Add a warning about it might raise RecursionError on very
complex expressions due to the recursive unparsing aspect of ast.unparse
(cherry picked from commit 8df1016)
2020-06-28 02:22:30 +01:00
Pablo Galindo 6803ff28f8
[3.9] Add soft keywords to the documentation (GH-21185) (GH-21187)
(cherry picked from commit 89e82c4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-06-28 02:10:37 +01:00
Miss Islington (bot) c1634ac834
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
Automerge-Triggered-By: @merwok
(cherry picked from commit cf18c9e9d4)

Co-authored-by: Arisaka97 <solitaire2312@gmail.com>
2020-06-24 15:01:04 -07:00
Miss Islington (bot) 02d5c74f89
bpo-40707: Document that Popen.communicate sets the returncode attribute (GH-20283)
(cherry picked from commit bf2e515fa4)

Co-authored-by: Gareth Rees <gdr@garethrees.org>
2020-06-23 20:19:11 -07:00
Miss Islington (bot) ddd3c465bd
Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit a16d697049)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2020-06-22 19:22:45 -07:00
Jason R. Coombs 8a3469047c
[3.9] bpo-40924: Remove protocol for supplying Traversable objects from loaders (GH-20820)
Remove protocol that loaders can present a files method as found in importlib_resources 1.3-1.6 (added in Python 3.8b1).
2020-06-14 14:12:20 +02:00
Miss Islington (bot) bda4cc82de
[3.9] bpo-37674: Tweak imp module deprecation note in the docs (GH-20480) (GH-20859)
(cherry picked from commit dea3223740)


Co-authored-by: Zackery Spytz <zspytz@gmail.com>

Automerge-Triggered-By: @brettcannon
2020-06-13 13:55:38 -07:00
Miss Islington (bot) 18e07ba931
bpo-40895: Update weakref documentation to remove old warnings (GH-20687)
The doccumentation at https://docs.python.org/3.10/library/weakref.html cautions that the `WeakKeyDictionary` and `WeakValueDictionary` are susceptible to the problem of dictionary mutation during iteration.

These notes present the user with a problem that has no easy solution.

I dug into the implementation and found that fortunately, Antoine Pitrou already addressed this challenge (10 years ago!) by introducing an `_IterationGuard` context manager to the implementation, which delays mutation while an iteration is in progress.

I asked for confirmation and @pitrou agreed that these notes could be removed:
c1baa601e2GH-commitcomment-39514438
(cherry picked from commit 1642c0ef75)

Co-authored-by: Daniel Fortunov <asqui@users.noreply.github.com>
2020-06-10 13:33:59 -07:00
Miss Islington (bot) 3b97d1becb
bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) (GH-20780)
* Revert "bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)"

This reverts commit b33e52511a.
(cherry picked from commit ec88e1bca8)
2020-06-10 18:01:25 +02:00
Miss Islington (bot) 73b728a779
[3.9] bpo-34003: Re-add versionchanged entry in csv docs (GH-20657) (GH-20770)
Follow-up to GH-8014
(cherry picked from commit 7aed0524d4)


Co-authored-by: Éric Araujo <merwok@netwok.org>

Automerge-Triggered-By: @merwok
2020-06-09 18:26:36 -07:00
Miss Islington (bot) 1a819ca187
Remove reference to 3.7 and 3.8 backports. (GH-20754) (#20755)
(cherry picked from commit 323188360d)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-09 10:35:58 +02:00
Miss Islington (bot) 1220a47079
bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438)
Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
(cherry picked from commit 301f0d4ff9)

Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
2020-06-08 07:47:46 -07:00
Miss Islington (bot) be5ed59e29
bpo-22021: Update root_dir and base_dir documentation in shutil (GH-10367)
Also added an example in shutil in order to make more clear how they are to be used.

Initially reported by Weinan Li on bpo.
(cherry picked from commit 7633371dac)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2020-06-07 22:08:14 -07:00
Miss Islington (bot) a4fa9a9515
bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659) (GH-20661)
* Refresh importlib.metadata from importlib_metadata 1.6.1.

* 📜🤖 Added by blurb_it.

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2020-06-05 17:46:24 -04:00
Miss Islington (bot) 082cff1786
Fix spacing in docs for tarfile (GH-20629)
Before
```
content.txt is 42 bytes in size and isa regular file.
folder is 420 bytes in size and isa directory.
magic is 4200 bytes in size and issomething else.
```

After:
```
content.txt is 42 bytes in size and is a regular file.
folder is 420 bytes in size and is a directory.
magic is 4200 bytes in size and is something else.
```

Automerge-Triggered-By: @orsenthil
(cherry picked from commit 7a280197f4)

Co-authored-by: Harsha Laxman <HarshaLaxman@users.noreply.github.com>
2020-06-04 13:19:33 -07:00
Huon Wilson 3c7609a23c
[3.9] bpo-40630: Add tracemalloc.reset_peak (GH-20102) (GH-20545)
* bpo-40630: Add tracemalloc.reset_peak (GH-20102, cherrypick 8b62644)

The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent `tracemalloc.start()` or
tracemalloc.clear_traces()` call).

* Adjust docs to point to 3.9
2020-06-01 19:26:22 +02:00
Miss Islington (bot) 0a674638a3
bpo-17005: Move topological sort functionality to its own module (GH-20558)
The topological sort functionality that was introduced initially in the
functools module has been moved to a new graphlib module to
better accommodate the new tools and keep the original scope of the
functools module.
(cherry picked from commit 2f172d8f15)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-05-31 17:01:37 -07:00
Miss Islington (bot) 96d91071c0
bpo-40759: Deprecate the symbol module (GH-20364)
Automerge-Triggered-By: @pablogsal
(cherry picked from commit cf88871d6a)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-05-31 15:23:29 -07:00
Miss Islington (bot) cdb015b7ed
Fix asyncio.to_thread() documented return type (GH-20547)
When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine.

This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
(cherry picked from commit 2b201369b4)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-31 00:26:20 -07:00
Miss Islington (bot) 78cf711d1f
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
Reference to PySide has been removed has it is for Qt 4, which has reached end of life.
(cherry picked from commit 4649202ea7)

Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-05-29 19:04:25 -07:00
Miss Islington (bot) 8e5f11d1f8
Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509)
(cherry picked from commit 2831642212)

Co-authored-by: Windson yang <wiwindson@outlook.com>
2020-05-29 04:42:40 -07:00
Miss Islington (bot) 1a7e34cd62
Note the output ordering of combinatoric functions (GH-19732) (GH-20501) 2020-05-28 13:32:36 -07:00
Miss Islington (bot) e4cc3a7c1f
bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498) 2020-05-28 09:58:33 -07:00
Miss Islington (bot) a5936ad632
bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332)
Try to make the meaning of platlibdir clear.  The previous wording could
be misinterpreted to suggest that it will be used to find all shared
libraries on the system, and not just Python extensions.  Furthermore,
it was unclear whether it affects third-party (site-packages) extensions
or not.  The new wording tries to make its dual purpose clear,
and provide the additional example of extensions in site-packages.
(cherry picked from commit 242d95659b)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
2020-05-28 09:41:31 -07:00
Christian Heimes 8183e11d87
[3.9] bpo-40791: Use CRYPTO_memcmp() for compare_digest (GH-20456) (GH-20461)
hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function
when OpenSSL is available.

Note: The _operator module is a builtin module. I don't want to add
libcrypto dependency to libpython. Therefore I duplicated the wrapper
function and added a copy to _hashopenssl.c..
(cherry picked from commit db5aed931f)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-28 05:09:38 -07:00
Miss Islington (bot) 500cd89ecc
bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832)
(cherry picked from commit 372ee27d49)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-05-26 06:38:18 -07:00
Miss Islington (bot) cc0f50d62c
bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20414)
* bpo-39301: State that floor division is used for right shift operations

* Remove "without overflow check"
(cherry picked from commit af7553ac95)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-05-26 09:33:10 +01:00
Miss Islington (bot) 6597e2af83
bpo-40745: Fix typos in NewType docs (GH-20379)
(cherry picked from commit 2b0e654f91)

Co-authored-by: ziheng <zihenglv@gmail.com>
2020-05-25 21:52:14 -07:00
Benjamin Peterson b03e0ee226
[3.9] closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH-20403) (#20407)
(cherry picked from commit 4a0ac42)

Co-authored-by: sth <sth.dev@tejp.de>
2020-05-25 23:19:42 -05:00
Miss Islington (bot) 318a18eb88
bpo-23082: Better error message for PurePath.relative_to() from pathlib (GH-19611)
Co-authored-by: Sadhana Srinivasan <rotuna@Sadhanas-MBP.fritz.box>
(cherry picked from commit 448325369f)

Co-authored-by: Rotuna <sadhanasrinivasan@protonmail.com>
2020-05-25 13:01:20 -07:00
Miss Islington (bot) 46c1b9c7b5
bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661) (GH-20363) 2020-05-24 14:31:17 -07:00
Miss Islington (bot) 9181e2e2f3
bpo-40405: Fix asyncio.as_completed docs (GH-19753)
* Fix as_completed docs to correctly state the function return value.
* Also, improves the general wording of the as_completed documentation.

Co-Authored-By: Rémi Lapeyre <remi.lapeyre@henki.fr>
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
Co-Authored-By: Yury Selivanov <yury@edgedb.com>
(cherry picked from commit 13206b52d1)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
2020-05-23 16:23:53 -07:00
Miss Islington (bot) c1d7768ca8
Reword aware/naive introduction sentence (GH-20175)
This is more informative and avoids the question of whether the period should go inside or outside the quotation marks.

See also GH-20007.
(cherry picked from commit 2e76820a50)

Co-authored-by: Mathieu Dupuy <mathieu.dupuy@doctolib.com>
2020-05-22 15:30:47 -07:00
Miss Islington (bot) 3e650545bf
bpo-32309: Add support for contextvars in asyncio.to_thread() (GH-20278)
Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](https://github.com/python/cpython/pull/20143GH-discussion_r427808225) in GH-20143 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit 0f56263e62)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-20 22:38:00 -07:00
Miss Islington (bot) 20736b35b7
Fix code-block in zoneinfo (GH-20201)
```
Warning, treated as error:
/tmp/code/Doc/library/zoneinfo.rst:303:Error in "code-block" directive:
1 argument(s) required, 0 supplied.

.. code-block::

    >>> a = ZoneInfo("Europe/Berlin")
    >>> b = pickle.loads(europe_berlin_pkl)
    >>> a is b
    True
```
(cherry picked from commit 9095f76613)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2020-05-19 07:02:32 -07:00
Miss Islington (bot) e2991308c9
bpo-32309: Implement asyncio.to_thread() (GH-20143)
Implements `asyncio.to_thread`, a coroutine for asynchronously running IO-bound functions in a separate thread without blocking the event loop. See the discussion starting from [here](https://github.com/python/cpython/pull/18410GH-issuecomment-628930973) in GH-18410 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit cc2bbc2227)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-19 03:03:25 -07:00
Serhiy Storchaka 08b47c367a
bpo-40257: Revert changes to inspect.getdoc() (GH-20073) 2020-05-18 20:25:07 +03:00
Lumír 'Frenzy' Balhar adc72bb2f9
bpo-38112: Document that compileall.compile_[dir,file] also accept multiple opt levels (GH-20174) 2020-05-18 15:23:37 +02:00
qudongfang bb8635cc3b
bpo-40651: Improve LRU recipe in the OrderedDict documentation (GH-#20139) 2020-05-17 20:50:51 -07:00
Paul Ganssle e527ec8abe
bpo-40536: Add zoneinfo.available_timezones (GH-20158)
This was not specified in the PEP, but it will likely be a frequently requested feature if it's not included.

This includes only the "canonical" zones, not a simple listing of every valid value of `key` that can be passed to `Zoneinfo`, because it seems likely that that's what people will want.
2020-05-17 21:55:11 -04:00
Mathieu Dupuy 65460565df
Doc: change 'Posix' for 'POSIX' (GH-20001) 2020-05-17 23:29:51 +02:00
Mathieu Dupuy 4eba67783e
Doc: move a dot outside double quotes (GH-20007) 2020-05-17 23:24:59 +02:00
Zackery Spytz 46545000c2
bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145)
Patch by Zackery Spytz.
2020-05-17 03:52:47 -07:00
Christian Heimes 837f9e42e3
bpo-40645: Deprecated internal details of hmac.HMAC (GH-20132) 2020-05-17 01:05:40 +02:00