Commit Graph

12143 Commits

Author SHA1 Message Date
Виталий Дмитриев f6ca71a422
Fix duplicated words in the docs (GH-102629)
With grep utility found some duplicated words

Automerge-Triggered-By: GH:AlexWaygood
2023-03-12 11:03:59 -07:00
Guido van Rossum e6210621be
Fixes duplicated word (#102623)
In line 1627, the end of the sentence reads "only that that it may be." but it should read "only that it may be" (or alternatively "only that that may be").

Co-authored-by: Hugo Gabriel Eyherabide <hugogabriel.eyherabide@gmail.com>
2023-03-12 09:58:02 -07:00
Thomas Krennwallner ced13c96a4
gh-79940: add introspection API for asynchronous generators to `inspect` module (#11590) 2023-03-11 18:49:40 +05:30
Brandt Bucher 08b67fb34f
GH-90997: Shrink the LOAD_GLOBAL caches (#102569) 2023-03-10 17:01:16 -08:00
Nikita Sobolev b48be8fa18
gh-102103: add `module` argument to `dataclasses.make_dataclass` (#102104) 2023-03-10 17:26:46 -07:00
Steve Dower 12226bec25
gh-102519: Add doc updates for os.listdrives, listvolumes and listmounts (GH-102585) 2023-03-10 15:41:32 +00:00
Owain Davies 53dceb53ad
gh-86509: Add link to Lib/_threading_local.py in threading docs (#101824) 2023-03-10 13:22:02 +01:00
sblondon 7d801f245e
Remove or update bitbucket links (GH-101963)
Since Mercurial removal from bitbucket.org, some links are broken.
They are replaced by github.com or webarchive.org links if available. Otherwise, they are removed.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-03-08 11:24:39 +01:00
Nikita Sobolev 1f557f94c2
gh-101100: Fix sphinx warnings in `zipapp` and `zipfile` modules (#102526) 2023-03-08 08:19:05 +00:00
Marcin Wieczorek 061325e0d2
Fix style in argparse.rst (#101733) 2023-03-07 23:25:28 -08:00
Hyunkyun Moon d3ca042c99
gh-95672: Fix versionadded indentation of get_pagesize in test.rst (gh-102455) 2023-03-06 22:56:19 +09:00
Barney Gale 6716254e71
GH-101362: Optimise PurePath(PurePath(...)) (GH-101667)
The previous `_parse_args()` method pulled the `_parts` out of any supplied `PurePath` objects; these were subsequently joined in `_from_parts()` using `os.path.join()`. This is actually a slower form of joining than calling `fspath()` on the path object, because it doesn't take advantage of the fact that the contents of `_parts` is normalized!

This reduces the time taken to run `PurePath("foo", "bar")` by ~20%, and the time taken to run `PurePath(p, "cheese")`, where `p = PurePath("/foo", "bar", "baz")`, by ~40%.

Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 15:50:21 -08:00
Sergey B Kirpichev 5da379ca7d
Move around example in to_bytes() to avoid confusion (#101595)
Moves an example to be closer to the sentence that refers to it.
2023-03-05 09:31:56 +00:00
Wagner Alberto cb944d0be8
Add import of `unittest.mock.Mock` in documentation (#102346) 2023-03-03 22:55:31 +05:30
Owain Davies 4e7c0cbf59
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840) 2023-03-03 10:51:32 +00:00
Michael K 73250000ac
Fix typos in documentation and comments (GH-102374)
Found some duplicate `to`s in the documentation and some code comments and fixed them.


[Misc/NEWS.d/3.12.0a1.rst](ed55c69ebd/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file.  Looks auto generated.  I'm happy to amend the PR if requested. :)

Automerge-Triggered-By: GH:AlexWaygood
2023-03-02 07:26:49 -08:00
Stefan Pochmann eaae563b68
gh-102088 Optimize iter_index itertools recipe (GH-102360) 2023-03-01 21:16:23 -06:00
Hyunkyun Moon 2f62a5da94
gh-95672 skip fcntl when pipesize is smaller than pagesize (gh-102163) 2023-03-01 23:56:19 +09:00
Furkan Onder 85b1fc1fc5
GH-90744: Fix erroneous doc links in the sys module (#101319)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-02-28 13:43:00 +02:00
Steven Troxler 0f89acf6cc
gh-101561: Add typing.override decorator (#101564)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-27 13:16:11 -08:00
Sergey B Kirpichev 4624987b29
gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)
Make docstrings for `as_integer_ratio` consistent across types, and document that
the returned pair is always normalized (coprime integers, with positive denominator).

---------

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-02-27 19:11:28 +00:00
Gouvernathor 0db6f44259
gh-102296 Document that inspect.Parameter kinds support ordering (GH-102297)
Automerge-Triggered-By: GH:AlexWaygood
2023-02-27 07:13:18 -08:00
Nikita Sobolev 101a12c576
gh-101100: Fix sphinx warnings in `types` module (#102274)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-27 07:26:21 +00:00
Rotzbua f3cb15c88a
gh-91038: Change default argument value to `False` instead of `0` (#31621)
The argument is used as a switch and corresponds to a boolean logic. Therefore it is more intuitive to use the corresponding constant `False` as default value instead of the integer `0`.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-02-26 18:10:34 -08:00
Skip Montanaro bcadcde712
gh-102259: Fix re doc issue regarding right square brackets (#102264)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-25 21:22:16 -05:00
Nikita Sobolev a498de4c0e
gh-101100: Fix sphinx warnings in `typing` module docs (#102260) 2023-02-25 21:48:00 +00:00
Jelle Zijlstra 207e1c5cae
asyncio docs: Fix dangling hyphen (#102227)
Currently this gets rendered with a dangling hyphen.
2023-02-25 05:21:32 -08:00
Hugo van Kemenade b7c1126447
gh-101100: Fix Sphinx warnings in `decimal` module (#102125)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-02-25 11:42:45 +02:00
Stefan Pochmann 81bf10e4f2
gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189) 2023-02-24 10:13:05 -06:00
Yeojin Kim 347f7406df
gh-81652: Add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants (gh-102191) 2023-02-24 19:26:51 +09:00
Carl Meyer 056dfc71dc
gh-87634: remove locking from functools.cached_property (GH-101890)
Remove the undocumented locking capabilities of functools.cached_property.
2023-02-22 17:49:22 -08:00
Terry Jan Reedy 8f647477f0
Fix syntax error in struct doc example (#102160)
Missing closing ) reported on Discuss by Chukwudi Nwachukwu.
2023-02-22 18:55:03 -05:00
Owain Davies 96bf24380e
GH-101777: `queue.rst`: use 2 spaces after a period to be consistent. (#102143) 2023-02-22 14:21:38 -06:00
somebody 8d46c7ed5e
gh-102135: Update turtle docs to rename wikipedia demo to rosette (#102137) 2023-02-22 12:11:30 +02:00
ram vikram singh b40dd71241
gh-100556: Improve clarity of `or` docs (#100589)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-02-21 11:34:56 +01:00
Owain Davies 350ba7c07f
gh-101777: Make `PriorityQueue` docs slightly clearer (#102026)
Adjust wording slightly, and use min(entries) instead of
sorted(list(entries))[0] as an example.
2023-02-21 11:24:33 +01:00
Irit Katriel 4d3bc89a3f
gh-102011: use sys.exception() instead of sys.exc_info() in docs where possible (#102012) 2023-02-20 21:54:19 +00:00
Filipe Laíns 84181c1404
GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589)
Automerge-Triggered-By: GH:FFY00
2023-02-20 11:21:10 -08:00
Mark Dickinson b513c46d99
gh-85417: Clarify behaviour on branch cuts in cmath module (#102046)
This PR updates the cmath module documentation to reflect the reality that Python is almost always (and as far as I can tell, that "almost" can be omitted) running on a machine whose C double supports signed zeros.

* Removes misleading references to functions being continuous from above / below / the left / the right at branch cuts
* Expands the note on branch cuts at the top of the module documentation to explain the double-sided sign-of-zero-based behaviour
2023-02-19 19:15:44 +00:00
Patricio Paez 6aab56f3c2
gh-99735: Use required=True in argparse subparsers example (#100927) 2023-02-18 17:06:03 -08:00
Reza Rastak 36b670908b
Fix incorrectly documented attribute in csv docs (#101250) 2023-02-18 16:55:43 -08:00
Furkan Onder 61f1e67c6f
GH-84783: Make the slice object hashable (GH-101264) 2023-02-18 18:22:02 -06:00
Nikita Sobolev af446bbb76
gh-101536: [docs] Improve attributes of `urllib.error.HTTPError` (#101612)
* gh-101536: [docs] Improve attributes of `urllib.error.HTTPError`

* Address review
2023-02-18 12:46:33 -03:00
Owain Davies 7f1c721756
gh-101739: [Enum] update docs - default boundary for Flag is CONFORM (GH-101746) 2023-02-17 13:36:47 -08:00
Jan Gosmann 77d95c8373
gh-100226: Clarify StreamReader.read behavior (#101807) 2023-02-17 13:01:26 -08:00
Dustin Rodrigues a1723caabf
gh-101992: update plistlib examples to be runnable (#101994)
* gh-101992: update plistlib examples to be runnable

* Update Doc/library/plistlib.rst

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-17 14:30:29 -05:00
sblondon 924a3bfa28
gh-93573: Replace wrong example domains in configparser doc (GH-93574)
* Replace bitbucket.org domain by forge.example
* Update example to python.org
* Use explicitly invalid domain

topsecret.server.com domain is not controled by PSF. It's replaced by invalid topsecret.server.example domain. It follows RFC 2606, which advise .example as TLD for documentation.
2023-02-16 16:13:21 +01:00
Rayyan Ansari 739c026f44
gh-101881: Support (non-)blocking read/write functions on Windows pipes (GH-101882)
* fileutils: handle non-blocking pipe IO on Windows

Handle erroring operations on non-blocking pipes by reading the _doserrno code.
Limit writes on non-blocking pipes that are too large.

* Support blocking functions on Windows

Use the GetNamedPipeHandleState and SetNamedPipeHandleState Win32 API functions to add support for os.get_blocking and os.set_blocking.
2023-02-16 14:52:24 +00:00
Erlend E. Aasland c1ce0d178f
gh-99138: Isolate _zoneinfo (#99218)
* Convert zone info type to heap type and add it to module state
* Add global variables to module state
2023-02-15 22:58:48 +01:00
Erlend E. Aasland 8a2b7ee64d
gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence (#101698) 2023-02-15 06:27:16 +01:00