(cherry picked from commit d29f57f603)
Co-authored-by: Justin Williams <97240811+juswil@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
(cherry picked from commit c9c6e04380)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
PI objects instead of comment objects.
(cherry picked from commit de6f97cd35)
Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
gh-111112: Avoid potential confusion in TCP server example. (GH-111113)
Improve misleading TCP server docs and example.
socket.recv(), as documented by the Python reference documentation,
returns at most `bufsize` bytes, and the underlying TCP protocol means
there is no guaranteed correspondence between what is sent by the client
and what is received by the server.
This conflation could mislead readers into thinking that TCP is
datagram-based or has similar semantics, which will likely appear to
work for simple cases, but introduce difficult to reproduce bugs.
(cherry picked from commit a79a27242f)
Co-authored-by: Aidan Holm <alfh@google.com>
Add note to `sys.orig_argv` clarifying the difference from `sys.argv` (GH-114630)
(cherry picked from commit 1836f674c0)
Co-authored-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
The text clearly seems to be referencing `TestFuncAcceptsSequencesMixin`,
for which no target is available. Name the class properly and suppress
the dangling reference.
(cherry picked from commit 7a93db4425)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
A 'single tuple' means 'one tuple, of whatever length.
Remove the unneeded and slightly distracting parenthetical 'singleton' comment.
(cherry picked from commit a1332a99cf)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-110893: Improve the documentation for __future__ module (GH-114642)
nedbat took issue with the phrasing "real module". I'm actually fine
with that phrasing, but I do think the `__future__` page should be clear
about the way in which the `__future__` module is special. (Yes, there
was a footnote linking to the future statements part of the reference,
but there should be upfront discussion).
I'm sympathetic to nedbat's claim that no one really cares about
`__future__._Feature`, so I've moved the interesting table up to the
top.
(cherry picked from commit 3b86891fd6)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
(cherry picked from commit 6c2b419fb9)
- consistently use correct parameter markup
- consistently use submodule name as database name
- improve accuracy of the dbm.dumb.open() spec
- remove dumbdbm class refs and replace them with generic "database object"
- use parameter list for dbm.dumb.open()
(cherry picked from commit 6c2b419fb9)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Also consolidate following paragraphs regarding database objects.
(cherry picked from commit 0bd8297a22)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
(cherry picked from commit 4cf068ed08)
- add abbreviation directives for NDBM and GDBM
- consistently spell NDBM as NDBM
- silence broken ndbm class refs
- improve accuracy of dbm.ndbm.open() spec
- use replacement text for NDBM/GDBM file format incompatibility note
- add refs to other parts of the docs (dict, bytes, etc.)
- clarify whichdb() return value by using list markup
- silence refs to example or generic submodule methods (keys, get, etc.)
(cherry picked from commit 65cf5dce11)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Also correct the default flag param for dbm.dumb.open();
it's 'c', not 'r'.
(cherry picked from commit 8c265408c5)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Use rst substitutions to reduce raw text duplication.
(cherry picked from commit 01105c7c4f)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Clarify that *target_is_directory* only matters if the target doesn't
exist.
(cherry picked from commit b822b85ac1)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Remove a double negative in the documentation of `mkdir()`'s *exist_ok*
parameter.
(cherry picked from commit 32c227470a)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 96c15b1c8d)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit fbc28748ea)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-114332: Fix the flags reference for ``re.compile()`` (GH-114334)
The GH-93000 change set inadvertently caused a sentence in re.compile()
documentation to refer to details that no longer followed. Correct this
with a link to the Flags sub-subsection.
(cherry picked from commit 567a85e9c1)
Co-authored-by: David H. Gutteridge <dhgutteridge@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
gh-112092: clarify unstable ABI recompilation requirements (GH-112093)
Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand.
(cherry picked from commit 68a7b78cd5)
Co-authored-by: DerSchinken <53398996+DerSchinken@users.noreply.github.com>
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
(cherry picked from commit a482bc67ee)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Tkinter is a fact, not necessarily a feature.
Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.
Improve shell bindings list.
(cherry picked from commit 4a32275389)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Simplify __post_init__ example usage. It applies to all base classes, not just dataclasses.
(cherry picked from commit 05008c27b7)
Co-authored-by: Steffen Zeile <48187781+Kaniee@users.noreply.github.com>
- Align the argument spec for fnmatch functions with the actual
implementation.
- Update Sphinx markup to recent recommandations.
- Add link to 'iterable' glossary entry.
(cherry picked from commit 6e84f3b56f)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from b1db6278cf)
Align the multiprocessing shared memory docs with Diatáxis's
recommendations for references.
- use a parameter list for the SharedMemory.__init__() argument spec
- use the imperative mode
- use versionadded, not versionchanged, for added parameters
- reflow touched lines according to SemBr
gh-114069: Revise Tutorial Methods paragraph (GH-114127)
Remove excess words in the first and third sentences.
(cherry picked from commit 31a2543c80)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit af85274086)
- add :class: and :mod: markups where needed
- fix incorrect escaping of a star in ShareableList arg spec
- mark up parameters with stars: *val*
- mark up list of built-in types using list markup
- remove unneeded parentheses from :meth: markups
gh-114070: correct the specification of ``digit`` in the float() docs (GH-114080)
(cherry picked from commit 4f24b92aa0)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
[3.12] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022)
(cherry picked from commit 94b1d1fa38)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
gh-89159: Document missing TarInfo members (GH-91564)
(cherry picked from commit 3aa4b839e4)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599)
(cherry picked from commit a47353d587)
Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
Link to the glossary for "magic methods" in ``MagicMock`` (GH-111292)
The MagicMock documentation mentions magic methods several times without
actually pointing to the term in the glossary. This can be helpful for
people to fully understand what those magic methods are.
(cherry picked from commit e97da8677f)
Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039)
(cherry picked from commit 32f3684b8f)
Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
* Add new installation path functions subsection
* Add content from install/index to sysconfig
* Fix table
* Update note about installers
* Clean up the list of schemes, remove references to Distutils.
(cherry picked from commit f16e81f368)
gh-113625: Align object addresses in the Descriptor HowTo Guide (GH-113894)
(cherry picked from commit 901a971e16)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4aa8f)
Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>