summaryrefslogtreecommitdiffstats
path: root/Doc/library
Commit message (Collapse)AuthorAgeFilesLines
* Clarify that Set._from_iterable is not required to be a classmethod. (GH-23272)Richard Levasseur2020-11-211-1/+1
|
* bpo-42232: mmap module add Darwin specific madvise options. (GH-23076)David CARLIER2020-11-211-0/+2
|
* bpo-42407: Use possessive appostrophe in multiprocessing doc (GH-23400)ArioA2020-11-211-1/+1
|
* bpo-42360: Add advice to help avoid pickling issues. (GH-23305)Raymond Hettinger2020-11-201-0/+3
|
* Fix wrong availability for signal.SIGCHLD (#23285)Zhang Maiyun2020-11-201-1/+1
| | | I believe this is a mistake. SIGCHLD is only available on Unix systems, not Windows.
* bpo-35498: Added slice support to PathLib parents attribute. (GH-11165)Joshua Cannon2020-11-201-0/+2
| | | Added slice support to the `pathlib.Path.parents` sequence. For a `Path` `p`, slices of `p.parents` should return the same thing as slices of `tuple(p.parents)`.
* bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)Christian Heimes2020-11-202-2/+7
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-42345: Add whatsnew and versionchanged for typing.Literal in 3.9 (GH-23386)kj2020-11-191-0/+6
| | | | | | * Whatsnew entry in 3.9 same as the one in 3.10. * versionchanged for typing.Literal docs Needs backport to 3.9.
* bpo-42345: Fix hash implementation of typing.Literal (GH-23383)Yurii Karabas2020-11-191-3/+3
| | | | | | | Fix hash implementation of `typing.Literal`. Update docs regarding `typing.Litaral` caching. Base implementation was done in PR #23294.
* [doc] Fix smtplib and xml.dom.minidom mark-up (GH-22769)Andre Delfino2020-11-182-3/+3
|
* bpo-41625: Specify that Linux >= 2.6.17 *and* glibc >= 2.5 are requir… ↵Pablo Galindo2020-11-171-1/+1
| | | | | (GH-23351) …ed for splice()
* bpo-41625: Add versionadded to os.splice() constants (GH-23340)Pablo Galindo2020-11-171-0/+1
|
* bpo-41625: Expose the splice() system call in the os module (GH-21947)Pablo Galindo2020-11-171-0/+32
|
* bpo-37205: time.perf_counter() and time.monotonic() are system-wide (GH-23284)Victor Stinner2020-11-161-7/+36
| | | | | | | time.perf_counter() on Windows and time.monotonic() on macOS are now system-wide. Previously, they used an offset computed at startup to reduce the precision loss caused by the float type. Use time.perf_counter_ns() and time.monotonic_ns() added in Python 3.7 to avoid this precision loss.
* bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297)Yash Shete2020-11-161-3/+3
| | | The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
* bpo-42317: Improve docs of typing.get_args concerning Union (GH-23254)Dominik11232020-11-161-0/+3
|
* fix typo in ThreadedChildWatcher docs (GH-23277)Thomas Grainger2020-11-141-1/+1
|
* bpo-42131: Add PEP 451-related methods to zipimport (GH-23187)Brett Cannon2020-11-131-3/+43
| | | | | Specifically, find_spec(), create_module(), and exec_module(). Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
* bpo-41001: Add os.eventfd() (#20930)Christian Heimes2020-11-131-0/+96
| | | Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264)Jürgen Gmach2020-11-131-1/+3
|
* bpo-40968: Send http/1.1 ALPN extension (#20959)Christian Heimes2020-11-132-0/+10
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-42308: Add threading.__excepthook__ (GH-23218)Mario Corchero2020-11-121-0/+7
| | | | | Add threading.__excepthook__ to allow retrieving the original value of threading.excepthook in case it is set to a broken or a different value.
* bpo-40932: Note security caveat of shlex.quote on Windows (GH-21502)Ammar Askar2020-11-112-5/+16
| | | | | Added a note in the `subprocess` docs that recommend using `shlex.quote` without mentioning that this is only applicable to Unix. Also added a warning straight into the `shlex` docs since it only says "for simple syntaxes resembling that of the Unix shell" and says using `quote` plugs the security hole without mentioning this important caveat.
* bpo-39411: pyclbr rewrite on AST (#18103)Batuhan Taskaya2020-11-111-0/+7
| | | | | - Rewrite pyclbr using an AST processor - Add is_async to the pyclbr.Function
* bpo-41543: contextlib.nullcontext can fill in for an async context manager ↵Tom Gringauz2020-11-091-0/+18
| | | | | (GH-21870) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147)Ammar Askar2020-11-091-0/+18
|
* Minor wording change in concurrent.futures. (GH-23194)Don Kirkby2020-11-081-3/+3
| | | Fixes a grammar problem by adding a missing "as", and clarifies the wording of the valid ranges for max_workers.
* Remove outdated reference to pywin32 from platform module (GH-22005)Andre Delfino2020-11-061-7/+0
|
* bpo-26389: Allow passing an exception object in the traceback module (GH-22610)Zackery Spytz2020-11-051-11/+32
| | | | | | The format_exception(), format_exception_only(), and print_exception() functions can now take an exception object as a positional-only argument. Co-Authored-By: Matthias Bussonnier <bussonniermatthias@gmail.com>
* [docs] fix wrongly named AsyncContextDecorator (GH-23164)kj2020-11-051-3/+5
| | | Also added versionchanged.
* bpo-40816 Add AsyncContextDecorator class (GH-20516)Kazantcev Andrey2020-11-051-0/+62
| | | | Co-authored-by: Yury Selivanov <yury@edgedb.com>
* bpo-42236: os.device_encoding() respects UTF-8 Mode (GH-23119)Victor Stinner2020-11-041-0/+8
| | | | On Unix, the os.device_encoding() function now returns 'UTF-8' rather than the device encoding if the Python UTF-8 Mode is enabled.
* bpo-42251: Add gettrace and getprofile to threading (GH-23125)Mario Corchero2020-11-041-0/+20
| | | This allows to retrieve the functions that were set in these two, which might differ from sys.gettrace and sys.getprofile within a thread.
* Fix incorrect links in ast docs (GH-23017)Matthew Suozzo2020-11-031-6/+7
|
* bpo-42236: Enhance init and encoding documentation (GH-23109)Victor Stinner2020-11-025-42/+123
| | | | | | | | | | | | | | | | | | | | | Enhance the documentation of the Python startup, filesystem encoding and error handling, locale encoding. Add a new "Python UTF-8 Mode" section. * Add "locale encoding" and "filesystem encoding and error handler" to the glossary * Remove documentation from Include/cpython/initconfig.h: move it to Doc/c-api/init_config.rst. * Doc/c-api/init_config.rst: * Document command line options and environment variables * Document default values. * Add a new "Python UTF-8 Mode" section in Doc/library/os.rst. * Add warnings to Py_DecodeLocale() and Py_EncodeLocale() docs. * Document how Python selects the filesystem encoding and error handler at a single place: PyConfig.filesystem_encoding and PyConfig.filesystem_errors. * PyConfig: move orig_argv member at the right place.
* bpo-41435: Add sys._current_exceptions() function (GH-21689)Julien Danjou2020-11-021-0/+12
| | | | | | This adds a new function named sys._current_exceptions() which is equivalent ot sys._current_frames() except that it returns the exceptions currently handled by other threads. It is equivalent to calling sys.exc_info() for each running thread.
* bpo-42230: Improve asyncio documentation regarding accepting sets vs ↵Jakub Stasiak2020-11-021-4/+4
| | | | | | | | | | | | | | iterables (GH-23073) People call wait() and as_completed() with various non-set iterables, a list should be the most common but there are others as well[1]. Considering typeshed also documents wait()[2] and as_completed()[3] as accepting arbitrary iterables I think it's a good idea to document the status quo better. [1] https://github.com/aio-libs/aiokafka/pull/672 [2] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyi#L161 [3] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyi#L40
* bpo-41229: Update docs for explicit aclose()-required cases and add ↵Joongi Kim2020-11-021-0/+33
| | | | | | | | | | | | | | | | | | | contextlib.aclosing() method (GH-21545) This is a PR to: * Add `contextlib.aclosing` which ia analogous to `contextlib.closing` but for async-generators with an explicit test case for [bpo-41229]() * Update the docs to describe when we need explicit `aclose()` invocation. which are motivated by the following issues, articles, and examples: * [bpo-41229]() * https://github.com/njsmith/async_generator * https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/#cleanup-in-generators-and-async-generators * https://www.python.org/dev/peps/pep-0533/ * https://github.com/achimnol/aiotools/blob/ef7bf0cea7af/src/aiotools/context.py#L152 Particuarly regarding [PEP-533](https://www.python.org/dev/peps/pep-0533/), its acceptance (`__aiterclose__()`) would make this little addition of `contextlib.aclosing()` unnecessary for most use cases, but until then this could serve as a good counterpart and analogy to `contextlib.closing()`. The same applies for `contextlib.closing` with `__iterclose__()`. Also, still there are other use cases, e.g., when working with non-generator objects with `aclose()` methods.
* bpo-42236: Use UTF-8 encoding if nl_langinfo(CODESET) fails (GH-23086)Victor Stinner2020-11-011-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the nl_langinfo(CODESET) function returns an empty string, Python now uses UTF-8 as the filesystem encoding. In May 2010 (commit b744ba1d14c5487576c95d0311e357b707600b47), I modified Python to log a warning and use UTF-8 as the filesystem encoding (instead of None) if nl_langinfo(CODESET) returns an empty string. In August 2020 (commit 94908bbc1503df830d1d615e7b57744ae1b41079), I modified Python startup to fail with a fatal error and a specific error message if nl_langinfo(CODESET) returns an empty string. The intent was to prevent guessing the encoding and also investigate user configuration where this case happens. In 10 years (2010 to 2020), I saw zero user report about the error message related to nl_langinfo(CODESET) returning an empty string. Today, UTF-8 became the defacto standard and it's safe to make the assumption that the user expects UTF-8. For example, nl_langinfo(CODESET) can return an empty string on macOS if the LC_CTYPE locale is not supported, and UTF-8 is the default encoding on macOS. While this change is likely to not affect anyone in practice, it should make UTF-8 lover happy ;-) Rewrite also the documentation explaining how Python selects the filesystem encoding and error handler.
* bpo-42198: New section in stdtypes for type annotation types (GH-23063)kj2020-10-311-4/+14
|
* bpo-42198: Improve consistency of Union docs (GH-23029)kj2020-10-311-23/+14
| | | | | | | No backport is required since union is only in 3.10. This addresses "3. Consistency nitpicks for Union's docs" in the bpo. Please skip news. Thank you.
* bpo-42198: Document __new__ for types.GenericAlias (GH-23039)kj2020-10-312-2/+14
|
* bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)kj2020-10-301-37/+74
| | | Follow up to 7cdf30fff39ea97f403b5472096349998d190e30 and 4173320920706b49a004bdddd8d7108e8984e3fc. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR.
* bpo-42061: Document __format__ for IP addresses (GH-23018)Teugea Ioan-Teodor2020-10-291-2/+34
| | | Automerge-Triggered-By: GH:ericvsmith
* bpo-42180: fix plural in arguments and control (GH-23015)Rafael Fontenelle2020-10-291-1/+1
| | | https://bugs.python.org/issue42180
* bpo-42029: Remove IRIX code (GH-23023)Victor Stinner2020-10-291-3/+3
| | | | IRIX code was slowy removed in Python 2.4 (--with-sgi-dl), Python 3.3 (Irix threads), and Python 3.7.
* bpo-34204: Use pickle.DEFAULT_PROTOCOL in shelve (GH-19639)Zackery Spytz2020-10-291-5/+15
| | | | Use pickle.DEFAULT_PROTOCOL (currently 5) in shelve instead of a hardcoded 3.
* bpo-41805: Documentation for PEP 585 (GH-22615)kj2020-10-272-0/+201
|
* bpo-30681: Support invalid date format or value in email Date header (GH-22090)Georges Toth2020-10-272-2/+7
| | | | | | | | | | | | | | | | | | | | I am re-submitting an older PR which was abandoned but is still relevant, #10783 by @timb07. The issue being solved () is still relevant. The original PR #10783 was closed as the final request changes were not applied and since abandoned. In this new PR I have re-used the original patch plus applied both comments from the review, by @maxking and @pganssle. For reference, here is the original PR description: In email.utils.parsedate_to_datetime(), a failure to parse the date, or invalid date components (such as hour outside 0..23) raises an exception. Document this behaviour, and add tests to test_email/test_utils.py to confirm this behaviour. In email.headerregistry.DateHeader.parse(), check when parsedate_to_datetime() raises an exception and add a new defect InvalidDateDefect; preserve the invalid value as the string value of the header, but set the datetime attribute to None. Add tests to test_email/test_headerregistry.py to confirm this behaviour; also added test to test_email/test_inversion.py to confirm emails with such defective date headers round trip successfully. This pull request incorporates feedback gratefully received from @bitdancer, @brettcannon, @Mariatta and @warsaw, and replaces the earlier PR #2254. Automerge-Triggered-By: GH:warsaw
* Add a link to buffer protocol in bytearray() doc (GH-22675)Antoine2020-10-261-2/+2
|