Commit Graph

11777 Commits

Author SHA1 Message Date
Gregory P. Smith 34de67c094
gh-96512: Update int_max_str docs to say 3.11 (#96942)
It was unknown if it'd be before 3.11.0 when creating the original
changes.  It's in 3.11rc2, so 3.11 it is.
2022-09-19 16:43:11 -07:00
Shantanu 5b3a2569f4
gh-96917: link to typing.readthedocs.io from typing.rst (#96921)
See the discussion at https://github.com/python/cpython/issues/91533
2022-09-19 12:09:41 -07:00
Raymond Hettinger bbc24b2bd5
GH-96851: Add link to FAQ entry for caching method calls. (GH-96902) 2022-09-18 16:36:20 -05:00
partev 2d1a2d902a
fix various typos in random module's documentation (GH-96912) 2022-09-18 14:35:22 -07:00
Scott Main 810ae51787
gh-94787: [doc] Add to argparse doc an example of a mutually-exclusive group nested in an argument group (GH-94807) 2022-09-18 09:05:43 +01:00
Raymond Hettinger 670007abb4
Clarify that the expression is regular math notation, not Python. (#96903) 2022-09-17 21:09:39 -05:00
Raymond Hettinger 78359b1d45
Simplify sieve() recipe. Add edge case tests. (GH-96892) 2022-09-17 11:31:04 -05:00
Victor Stinner e841ffc915
gh-95778: Mention sys.set_int_max_str_digits() in error message (#96874)
When ValueError is raised if an integer is larger than the limit,
mention sys.set_int_max_str_digits() in the error message.
2022-09-16 20:04:37 +02:00
Erlend E. Aasland 16c33a9676
gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (#96832) 2022-09-15 23:11:52 +02:00
Raymond Hettinger 8dc9b3fbc1
Itertools sieve() recipe (#96813) 2022-09-13 21:10:47 -05:00
Benjamin Peterson fd1e477f53
closes gh-96734: Update to Unicode 15.0.0. (GH-96809) 2022-09-13 15:45:12 -07:00
Alex Waygood bf5fd49252
gh-95778: Fix `sys.set_int_max_str_digits()` parameter name (#96798)
Discovered in https://github.com/python/typeshed/pull/8733
2022-09-13 08:22:50 -07:00
Erlend E. Aasland 49cceeb5c9
gh-96702: Order methods before attrs in sqlite3.Connection docs (#96703) 2022-09-13 10:28:57 +02:00
zhanpon 53a54b781d
gh-96706: [doc] Don't recomment deprecated use of get_event_loop() in examples (#96707) 2022-09-11 12:56:30 -07:00
Hendrik Makait 6281affee6
gh-94972: document that shield users need to keep a reference to their task (#96724)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2022-09-10 07:34:14 -07:00
finefoot c06c001b30
gh-92734: Add indentation feature to reprlib.Repr (GH-92735) 2022-09-08 13:51:44 -05:00
Vinay Sajip d5e07862ec
gh-88287: Add BufferingFormatter documentation. (GH-96608) 2022-09-08 08:22:33 +01:00
Irit Katriel c4999f261f
[doc] Update example in traceback doc (GH-96600)
This Monty Python reference is of-its-time. It could seem inappropriate in the context of today's sensibilities around mental health.

Automerge-Triggered-By: GH:iritkatriel
2022-09-05 14:30:51 -07:00
Vinay Sajip a9d58feccf
gh-84095: Fill documentation gap regarding user-defined objects. (GH-96574) 2022-09-05 07:47:47 +01:00
Pamela Fox a0ad63e70e
gh-93973: Add all_errors to asyncio.create_connection (#93974)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-09-04 18:33:50 -07:00
Erlend E. Aasland 9e55685782
Docs: alphabetically order sqlite3.Cursor attrs (#96565) 2022-09-04 23:34:45 +02:00
Sergey B Kirpichev 8464b754c4
gh-68163: Correct conversion of Rational instances to float (GH-25619)
* gh-68163: Correct conversion of Rational instances to float

Also document that numerator/denominator properties are instances of Integral.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2022-09-04 13:15:59 +01:00
Gregory P. Smith 69bb83c2bf
gh-95778: remove unneeded doc note on float.as_integer_ratio (#96553)
Per mdickinson@'s comment on the main branch PR.
2022-09-04 00:04:36 -07:00
Mehrdad Moradizadeh af6359dd5c
doc typo: spell limitation (#96542) 2022-09-03 23:23:32 -07:00
Vinay Sajip e5823bf9b5
gh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527) 2022-09-03 13:02:19 +01:00
Alexandru Mărășteanu 57b6110361
[Enum] bump version tag on HTTP status category indicators (GH-96508) 2022-09-02 13:11:18 -07:00
Cheryl Sabella ccce9b77e1
bpo-30419: DOC: Update missing information in bdb docs (#1687)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-09-02 13:22:42 -04:00
siph 2a9e4e4d73
gh-95180: Add `TaskGroup` and `Runner` to AsyncIO API Index (#95189)
Also rearrange some items in the list.

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-09-02 09:36:45 -07:00
Gregory P. Smith 511ca94520
gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
2022-09-02 09:35:08 -07:00
Raymond Hettinger 656167db81
Allow whitespace around a slash in fraction string inputs (GH-96496) 2022-09-02 11:10:58 -05:00
Erlend E. Aasland 91f40f3f78
gh-96168: Improve sqlite3 dict_factory example (#96457)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-09-01 23:47:59 +02:00
Irit Katriel 4c72517cad
gh-93554: Conditional jump opcodes only jump forward (GH-96318) 2022-09-01 21:36:47 +01:00
Piotr Kaznowski 615537e62f
gh-96408: Document difference between set-like view and sets. (GH-96439) 2022-08-31 16:23:52 -05:00
Vinay Sajip 29f1b0bb1f
gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)
Co-authored-by: Éric <merwok@netwok.org>
2022-08-31 10:50:29 +01:00
Erlend E. Aasland f7e7bf161a
gh-96414: Inline code examples in sqlite3 docs (#96442) 2022-08-31 07:54:54 +02:00
Erlend E. Aasland 7b01ce7953
Docs: normalise sqlite3 placeholder how-to heading (#96413) 2022-08-30 22:44:14 +02:00
Alexandru Mărășteanu 0ed778835d
gh-95149: Enhance `http.HTTPStatus` with properties that indicate the HTTP status category (GH-95453) 2022-08-30 11:11:44 -07:00
Adrian Garcia Badaracco 07f12b5c15
gh-95337: update TypeVarTuple example (#95338)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-08-30 07:57:03 -07:00
Tim Burke 860fa35145
Docs: Improve clarity for bytes.hex() (#95257) 2022-08-30 13:09:56 +02:00
Erlend E. Aasland 6d403e264a
Docs: normalize SQL style in sqlite3 docs (#96403) 2022-08-30 00:50:42 +02:00
Vinay Sajip 6324b135ac
gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380) 2022-08-29 22:29:22 +01:00
Erlend E. Aasland bf9259776d
gh-95432: Add doctests for the sqlite3 docs (#96225)
As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces
2022-08-29 10:52:39 +02:00
TW 023c51d9d8
gh-69142: add %:z strftime format code (gh-95983)
datetime.isoformat generates the tzoffset with colons, but there
was no format code to make strftime output the same format.

for simplicity and consistency the %:z formatting behaves mostly
as %z, with the exception of adding colons. this includes the
dynamic behaviour of adding seconds and microseconds only when
needed (when not 0).

this fixes the still open "generate" part of this issue:

https://github.com/python/cpython/issues/69142

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-08-28 14:27:42 -07:00
zhanpon 35e4da25d4
Docs: Fix count of bullets in asyncio-task.rst (#96307) 2022-08-26 20:50:48 -07:00
Ansab Gillani b462f143ff
Fix documentation typo for pathlib.Path.walk (GH-96301) 2022-08-26 14:21:40 -07:00
Dong-hee Na 0319cd6825
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242) 2022-08-26 11:02:57 +09:00
Dong-hee Na 47d406ffc4
gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293) 2022-08-26 10:43:02 +09:00
Sam Ezeh cd492d43a2
gh-76728: Coerce DictReader and DictWriter fieldnames argument to a list (GH-32225) 2022-08-25 05:13:24 -05:00
Vinay Sajip 8db7693bbf
gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803) 2022-08-25 08:27:30 +01:00
Pablo Galindo Salgado e34c82abeb
GH-93503: Add thread-specific APIs to set profiling and tracing functions in the C-API (#93504)
* gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API

* Use a separate API

* Fix NEWS entry

* Add locks around the loop

* Document ignoring exceptions

* Use the new APIs in the sys module

* Update docs
2022-08-24 23:21:39 +01:00