Commit graph

23265 commits

Author SHA1 Message Date
Dong-hee Na ad3252bad9
bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290) 2020-05-26 01:52:54 +09:00
Miro Hrončok e50883ccc4
bpo-39245: Fix docs links to the stable ABI (GH-20388)
Automerge-Triggered-By: @vstinner
2020-05-25 08:42:48 -07:00
Miro Hrončok ef16958d17
bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383) 2020-05-25 16:54:14 +02:00
Jakub Stasiak 372ee27d49
bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832) 2020-05-25 10:03:48 +03:00
Albert 59f5022b5d
bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)
Closes [Issue 17050]() by removing argparse.REMAINDER from the documentation, as discussed on the issue.

Automerge-Triggered-By: @rhettinger
2020-05-24 11:57:40 -07:00
Bar Harel 13206b52d1
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>
2020-05-23 19:14:31 -04:00
Shantanu 1cba1c9aba
bpo-34556: Document addition of upgrade_deps to venv.create (GH-20135) 2020-05-23 02:58:50 -07:00
Matteo Bertucci af23f0d3cf
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
Automerge-Triggered-By: @csabella
2020-05-22 18:12:09 -07:00
Sardorbek Imomaliev 8022eb4e97
[doc] Add missing space in urllib.request.rst (GH-19860)
This is just a typo fix, should I still provide news file?
2020-05-22 18:05:05 -07:00
Ville Skyttä da51ba442c
Cosmetic smtplib changes (GH-8718)
Some cosmetic smtplib changes here. Let me know if you'd like a bpo/news entry or splitting this PR into two.

Automerge-Triggered-By: @maxking
2020-05-22 17:50:58 -07:00
Antoine 6fad3e6b49
bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)
* Add 'users' variable in code sample.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2020-05-22 21:29:34 -03:00
Florian Dahlitz 30d5a7364d
bpo-40730: Remove redundant 'to' (GH-20316)
@ericvsmith I guess it is correct to merge it into master and not 3.9 directly?

Automerge-Triggered-By: @ericvsmith
2020-05-22 08:19:18 -07:00
Huon Wilson 8b62644831
bpo-40630: Add tracemalloc.reset_peak (GH-20102)
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).
2020-05-22 16:18:51 +02:00
Raymond Hettinger bfaf5275ad
Restore missing column of digits (GH-20313) 2020-05-22 06:54:42 -07:00
Andre Delfino 7864f11cdf
[doc] Remove references to obsolete BuildApplet on macOS. (GH-20023) 2020-05-21 18:45:23 -04:00
Mathieu Dupuy 2e76820a50
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.
2020-05-21 16:26:27 -04:00
Raymond Hettinger e16d2f7c37
Improve output summary in the examples and recipes section (GH-20285) 2020-05-21 01:37:38 -07:00
Kyle Stanley 0f56263e62
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/20143#discussion_r427808225) in GH-20143 for context.

Automerge-Triggered-By: @aeros
2020-05-20 22:20:43 -07:00
Rémi Lapeyre 7efb826c3e
Use f-strings in argparse HOWTO (GH-20070) 2020-05-20 21:22:59 -07:00
Raymond Hettinger df2e0ff0d6
Update whatsnew benchmark results for 3.9 (GH-20276) 2020-05-20 18:43:51 -07:00
Christian Heimes e572c7f6db
bpo-40698: Improve distutils upload hash digests (GH-20260)
- Fix upload test on systems that blocks MD5
- Add SHA2-256 and Blake2b-256 digests based on new Warehous and twine
  specs.

Signed-off-by: Christian Heimes <christian@python.org>
2020-05-20 07:37:25 -07:00
karl ding 550f30c8f3
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
This mentions the new CAN_J1939 implementation in the What's New
documentation for Python 3.9

Automerge-Triggered-By: @gvanrossum
2020-05-19 19:31:49 -07:00
Joe DeCapo a355a06fcc
Fix typo in multiprocessing documentation (GH-20016) 2020-05-19 20:07:09 +05:30
Julien Palard 19e3e00264
Doc: Python 3.10 in sidebar and version switcher. (GH-20209) 2020-05-19 14:26:43 +02:00
Ned Deily 29251b787b
3.10 whatsnew needs to use blurb-produced changelog (GH-20213) 2020-05-19 07:39:29 -04:00
Kyle Stanley cc2bbc2227
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/18410#issuecomment-628930973) in GH-18410 for context.

Automerge-Triggered-By: @aeros
2020-05-18 20:03:28 -07:00
Pablo Galindo d4fe098d1e
Python 3.10.0a0 (GH-20198) 2020-05-19 03:33:01 +01:00
Anthony Sottile 9095f76613
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
```
2020-05-18 19:02:54 -07:00
Serhiy Storchaka 08b47c367a
bpo-40257: Revert changes to inspect.getdoc() (GH-20073) 2020-05-18 20:25:07 +03:00
Ned Deily 951ab58024
Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)" (GH-20182)
This reverts commit 0da5466650.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
2020-05-18 11:31:21 -04: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
Ned Deily 0da5466650
bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)
Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.

Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-05-18 09:17:22 -04:00
Shantanu d17f3d8315
bpo-13601: Mention stderr's line buffering in What's New (GH-20168) 2020-05-17 22:07:57 -07: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
Rahul Kumaresan eefd4e0333
bpo-39705 : sorted() tutorial example under looping techniques improved (GH-18999) 2020-05-17 18:32:34 -07: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
Batuhan Taskaya cae2275949
bpo-40211: Clarify os.preadv and os.pwritev are supported on AIX 7.1+ (GH-19401) 2020-05-16 23:36:40 +01:00
Christian Heimes d5b3f6b7f9
bpo-37630: Use SHA3 and SHAKE XOF from OpenSSL (GH-16049)
OpenSSL 1.1.1 comes with SHA3 and SHAKE builtin.

Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
2020-05-16 13:27:06 -07:00
Paul Ganssle b17e49e0de
bpo-40503: Add documentation and what's new entry for zoneinfo (GH-20006)
This adds the documentation for the `zoneinfo` module added in PEP 615: https://www.python.org/dev/peps/pep-0615/

The implementation itself was GH-19909: https://github.com/python/cpython/pull/19909

bpo-40503: https://bugs.python.org/issue40503

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-05-16 12:14:58 -04:00
Paul Ganssle 1b97b9b0ad
bpo-24416: Return named tuple from date.isocalendar() (GH-20113)
{date, datetime}.isocalendar() now return a private custom named tuple object
IsoCalendarDate rather than a simple tuple.

In order to leave IsocalendarDate as a private class and to improve what
backwards compatibility is offered for pickling the result of a
datetime.isocalendar() call, add a __reduce__ method to the named tuples that
reduces them to plain tuples. (This is the part of this PR most likely to cause
problems — if it causes major issues, switching to a strucseq or equivalent
would be prudent).

The pure python implementation of IsoCalendarDate uses positional-only
arguments, since it is private and only constructed by position anyway; the
equivalent change in the argument clinic on the C side would require us to move
the forward declaration of the type above the clinic import for whatever
reason, so it seems preferable to hold off on that for now.

bpo-24416: https://bugs.python.org/issue24416

Original PR by Dong-hee Na with only minor alterations by Paul Ganssle.

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-05-16 10:02:59 -04:00
Batuhan Taskaya 4541086232
bpo-40192: Use thread_cputime for time.thread_time to improve resolution (GH-19381)
On AIX, time.thread_time() is now implemented with thread_cputime()
which has nanosecond resolution, rather than
clock_gettime(CLOCK_THREAD_CPUTIME_ID) which has a resolution of 10 ms.
2020-05-16 11:39:09 +02:00
Zackery Spytz 6b6092f533
bpo-39075: types.SimpleNamespace no longer sorts attributes in its repr (GH-19430) 2020-05-15 18:27:54 -07:00
Chris Jerdonek 1ce5841eca
bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979) 2020-05-15 16:55:50 -07:00
Christian Heimes 9b60e55db2
bpo-40637: Add option to disable builtin hashes (GH-20121)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
2020-05-15 14:54:53 -07:00
Shantanu a2b3cdd661
bpo-40445: Update compileall.compile_dir docs (GH-19806) 2020-05-15 14:28:23 -07:00
romasku 382a5635bd
bpo-40607: Reraise exception during task cancelation in asyncio.wait_for() (GH-20054)
Currently, if asyncio.wait_for() timeout expires, it cancels
inner future and then always raises TimeoutError. In case
those future is task, it can handle cancelation mannually,
and those process can lead to some other exception. Current
implementation silently loses thoses exception.

To resolve this, wait_for will check was the cancelation
successfull or not. In case there was exception, wait_for
will reraise it.

Co-authored-by: Roman Skurikhin <roman.skurikhin@cruxlab.com>
2020-05-15 13:12:05 -07:00