From b73cd99a4a9c97c5e436f4eee1c0df44df8059f0 Mon Sep 17 00:00:00 2001 From: Emil Berg Date: Wed, 16 Oct 2024 09:35:44 +0200 Subject: [PATCH] Docs: Fix typos in documentation files This includes: - .rst - .md - .txt - Misc/HISTORY - README See #125473 for context. --- Doc/c-api/init.rst | 2 +- Doc/c-api/long.rst | 2 +- Doc/c-api/monitoring.rst | 2 +- Doc/library/concurrent.futures.rst | 2 +- Doc/library/importlib.metadata.rst | 2 +- Doc/using/windows.rst | 4 ++-- InternalDocs/adaptive.md | 2 +- Lib/test/test_doctest/test_doctest2.txt | 2 +- Misc/HISTORY | 12 ++++++------ Misc/NEWS.d/3.10.0a2.rst | 2 +- Misc/NEWS.d/3.10.0a3.rst | 4 ++-- Misc/NEWS.d/3.10.0b1.rst | 2 +- Misc/NEWS.d/3.11.0a5.rst | 2 +- Misc/NEWS.d/3.11.0a7.rst | 2 +- Misc/NEWS.d/3.12.0a1.rst | 4 ++-- Misc/NEWS.d/3.12.0a4.rst | 2 +- Misc/NEWS.d/3.12.0a5.rst | 2 +- Misc/NEWS.d/3.12.0a7.rst | 2 +- Misc/NEWS.d/3.13.0a1.rst | 2 +- Misc/NEWS.d/3.13.0a3.rst | 2 +- Misc/NEWS.d/3.5.3rc1.rst | 2 +- Misc/NEWS.d/3.6.0b4.rst | 2 +- Misc/NEWS.d/3.7.0a1.rst | 2 +- Misc/NEWS.d/3.8.0a3.rst | 2 +- Misc/NEWS.d/3.9.0a1.rst | 2 +- Misc/NEWS.d/3.9.0a6.rst | 2 +- Objects/listsort.txt | 2 +- Tools/freeze/README | 2 +- Tools/tsan/suppressions_free_threading.txt | 2 +- 29 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index ffc5b4223ba589..412a41ce02cfd7 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -2418,7 +2418,7 @@ Example usage:: In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which can call arbitrary code through an object's deallocation function. The critical -section API avoids potentital deadlocks due to reentrancy and lock ordering +section API avoids potential deadlocks due to reentrancy and lock ordering by allowing the runtime to temporarily suspend the critical section if the code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`. diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index 6d3463fe25a614..9ff3e5265004a1 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -511,7 +511,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. free(bignum); *flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults - that behave most like a C cast, or a combintation of the other flags in + that behave most like a C cast, or a combination of the other flags in the table below. Note that ``-1`` cannot be combined with other flags. diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index 285ddb2889a67f..51d866cfd47469 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -147,7 +147,7 @@ would typically correspond to a python function. The ``version`` argument is a pointer to a value which should be allocated by the user together with ``state_array`` and initialized to 0, - and then set only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this + and then set only by :c:func:`!PyMonitoring_EnterScope` itself. It allows this function to determine whether event states have changed since the previous call, and to return quickly if they have not. diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index ce72127127c7a6..141b30194b84eb 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -206,7 +206,7 @@ ThreadPoolExecutor Example 'http://www.cnn.com/', 'http://europe.wsj.com/', 'http://www.bbc.co.uk/', - 'http://nonexistant-subdomain.python.org/'] + 'http://nonexistent-subdomain.python.org/'] # Retrieve a single page and report the URL and contents def load_url(url, timeout): diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 85d5a2d684d6eb..ddfc5c06d825c0 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -559,7 +559,7 @@ path. ``DatabaseDistribution``, then, would look something like:: - class DatabaseDistribution(importlib.metadata.Distributon): + class DatabaseDistribution(importlib.metadata.Distribution): def __init__(self, record): self.record = record diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 20d872d7639219..daaf8822af1161 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -838,8 +838,8 @@ The short form of the argument (``-3``) only ever selects from core Python releases, and not other distributions. However, the longer form (``-V:3``) will select from any. -The Company is matched on the full string, case-insenitive. The Tag is matched -oneither the full string, or a prefix, provided the next character is a dot or a +The Company is matched on the full string, case-insensitive. The Tag is matched +on either the full string, or a prefix, provided the next character is a dot or a hyphen. This allows ``-V:3.1`` to match ``3.1-32``, but not ``3.10``. Tags are sorted using numerical ordering (``3.10`` is newer than ``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``). diff --git a/InternalDocs/adaptive.md b/InternalDocs/adaptive.md index 09245730b271fa..6cb560eeb9dc1c 100644 --- a/InternalDocs/adaptive.md +++ b/InternalDocs/adaptive.md @@ -54,7 +54,7 @@ and `Tadaptive` is the mean time to execute the specialized and adaptive forms. `Ti` is the time to execute the `i`th instruction in the family and `Ni` is the number of times that instruction is executed. -`Tmiss` is the time to process a miss, including de-optimzation +`Tmiss` is the time to process a miss, including de-optimization and the time to execute the base instruction. The ideal situation is where misses are rare and the specialized diff --git a/Lib/test/test_doctest/test_doctest2.txt b/Lib/test/test_doctest/test_doctest2.txt index 76dab94a9c0470..d9dc859fc341dc 100644 --- a/Lib/test/test_doctest/test_doctest2.txt +++ b/Lib/test/test_doctest/test_doctest2.txt @@ -10,5 +10,5 @@ This test also has some (random) encoded (utf-8) unicode text: ЉЊЈЁЂ -This doesn't cause a problem in the tect surrounding the examples, but +This doesn't cause a problem in the test surrounding the examples, but we include it here (in this test text file) to make sure. :) diff --git a/Misc/HISTORY b/Misc/HISTORY index d68aaa066771fb..d74b2fba843f0c 100644 --- a/Misc/HISTORY +++ b/Misc/HISTORY @@ -1714,7 +1714,7 @@ IDLE move version to end. - Issue #14105: Idle debugger breakpoints no longer disappear - when inseting or deleting lines. + when inserting or deleting lines. - Issue #17172: Turtledemo can now be run from Idle. Currently, the entry is on the Help menu, but it may move to Run. @@ -11919,7 +11919,7 @@ Core and Builtins with a non-empty format string. This is an effort to future-proof user code. If a derived class does not currently implement __format__ but later adds its own __format__, it would most likely break user code that had - supplied a format string. This will be changed to a DeprecationWaring in + supplied a format string. This will be changed to a DeprecationWarning in Python 3.3 and it will be an error in Python 3.4. - Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly @@ -14964,7 +14964,7 @@ Library whitespace. - Issue #5940: distutils.command.build_clib.check_library_list was not doing - the right type checkings anymore. + the right type checks anymore. - Issue #4875: On win32, ctypes.util.find_library does no longer return directories. @@ -16950,7 +16950,7 @@ Core and Builtins - Patch #1953: Added ``sys._compact_freelists()`` and the C API functions ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList`` - to compact the internal free lists of pre-allocted ints and floats. + to compact the internal free lists of pre-allocated ints and floats. - Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls. Python expected the return type int but the fork familie returns @@ -32457,7 +32457,7 @@ you can have a single shared library that defines multiple modules. (SunOS / SVR4 style shared libraries only.) Jim Fulton's ``abstract object interface'' has been incorporated into -the run-time API. For more detailes, read the files +the run-time API. For more details, read the files "Include/abstract.h" and "Objects/abstract.c". The Macintosh version is much more robust now. @@ -33372,7 +33372,7 @@ manner. when deallocated. * There is a compile-time option to cache a string's hash function, -but this appeared to have a negligeable effect, and as it costs 4 +but this appeared to have a negligible effect, and as it costs 4 bytes per string it is disabled by default. diff --git a/Misc/NEWS.d/3.10.0a2.rst b/Misc/NEWS.d/3.10.0a2.rst index 3e82de9ef266d6..b2b70069644248 100644 --- a/Misc/NEWS.d/3.10.0a2.rst +++ b/Misc/NEWS.d/3.10.0a2.rst @@ -445,7 +445,7 @@ Fixed tests using IsolatedAsyncioTestCase from hanging on BaseExceptions. .. section: Library Fixed a bug that was causing :func:`ctypes.util.find_library` to return -``None`` when triying to locate a library in an environment when gcc>=9 is +``None`` when trying to locate a library in an environment when gcc>=9 is available and ``ldconfig`` is not. Patch by Pablo Galindo .. diff --git a/Misc/NEWS.d/3.10.0a3.rst b/Misc/NEWS.d/3.10.0a3.rst index 33c3e14b7a4bcf..990161ac06cf66 100644 --- a/Misc/NEWS.d/3.10.0a3.rst +++ b/Misc/NEWS.d/3.10.0a3.rst @@ -81,7 +81,7 @@ last line executed. .. section: Core and Builtins Speed up comparison of bytes objects with non-bytes objects when option -:option:`-b` is specified. Speed up comparison of bytarray objects with +:option:`-b` is specified. Speed up comparison of bytearray objects with non-buffer object. .. @@ -1413,7 +1413,7 @@ Stinner. The :c:func:`PyConfig_Read` function now only parses :c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after arguments are parsed. Since Python arguments are -strippped from :c:member:`PyConfig.argv`, parsing arguments twice would +stripped from :c:member:`PyConfig.argv`, parsing arguments twice would parse the application options as Python options. .. diff --git a/Misc/NEWS.d/3.10.0b1.rst b/Misc/NEWS.d/3.10.0b1.rst index 25c6b827146e82..3de744868f8168 100644 --- a/Misc/NEWS.d/3.10.0b1.rst +++ b/Misc/NEWS.d/3.10.0b1.rst @@ -161,7 +161,7 @@ Restore proper validation of complex literal value patterns when parsing .. nonce: TueFdQ .. section: Core and Builtins -Set frame.f_lineno to the line number of the 'with' kweyword when executing +Set frame.f_lineno to the line number of the 'with' keyword when executing the call to ``__exit__``. .. diff --git a/Misc/NEWS.d/3.11.0a5.rst b/Misc/NEWS.d/3.11.0a5.rst index 5418d5d59dd583..e8853e1d1f4c1a 100644 --- a/Misc/NEWS.d/3.11.0a5.rst +++ b/Misc/NEWS.d/3.11.0a5.rst @@ -82,7 +82,7 @@ Use two or three bytecodes to implement most calls. Calls without named arguments are implemented as a sequence of two instructions: ``PRECALL; CALL``. Calls with named arguments are implemented as a sequence of three instructions: ``PRECALL; KW_NAMES; CALL``. There are -two different ``PRECALL`` instructions: ``PRECALL_FUNTION`` and +two different ``PRECALL`` instructions: ``PRECALL_FUNCTION`` and ``PRECALL_METHOD``. The latter pairs with ``LOAD_METHOD``. This partition into pre-call and call allows better specialization, and thus diff --git a/Misc/NEWS.d/3.11.0a7.rst b/Misc/NEWS.d/3.11.0a7.rst index eff2ea2dac13f8..100194e5124bed 100644 --- a/Misc/NEWS.d/3.11.0a7.rst +++ b/Misc/NEWS.d/3.11.0a7.rst @@ -708,7 +708,7 @@ Made cumtime the default sorting key for cProfile .. nonce: 4n2aVU .. section: Library -Fix :class:`asyncio.Semaphore` re-aquiring FIFO order. +Fix :class:`asyncio.Semaphore` re-acquiring FIFO order. .. diff --git a/Misc/NEWS.d/3.12.0a1.rst b/Misc/NEWS.d/3.12.0a1.rst index f2668e99a6299b..9c6b5ed6570c96 100644 --- a/Misc/NEWS.d/3.12.0a1.rst +++ b/Misc/NEWS.d/3.12.0a1.rst @@ -2088,7 +2088,7 @@ annotations on class objects. Removed deprecated interfaces in ``importlib.metadata`` (entry points accessed as dictionary, implicit dictionary construction of sequence of -``EntryPoint`` objects, mutablility of ``EntryPoints`` result, access of +``EntryPoint`` objects, mutability of ``EntryPoints`` result, access of entry point by index). ``entry_points`` now has a simpler, more straightforward API (returning ``EntryPoints``). @@ -4728,7 +4728,7 @@ Updated tests to use preferred location for ``importlib.resources`` ABCs. .. nonce: IiTs5f .. section: Tests -Add a regression test for :mod:`re` exponentional slowdown when using +Add a regression test for :mod:`re` exponential slowdown when using rjsmin. .. diff --git a/Misc/NEWS.d/3.12.0a4.rst b/Misc/NEWS.d/3.12.0a4.rst index 57fb2052764b6f..1308c5b4bddfb6 100644 --- a/Misc/NEWS.d/3.12.0a4.rst +++ b/Misc/NEWS.d/3.12.0a4.rst @@ -1057,7 +1057,7 @@ errors. .. nonce: 4Xe0id .. section: Windows -``hasattr(ctypes.windll, 'nonexistant')`` now returns ``False`` instead of +``hasattr(ctypes.windll, 'nonexistent')`` now returns ``False`` instead of raising :exc:`OSError`. .. diff --git a/Misc/NEWS.d/3.12.0a5.rst b/Misc/NEWS.d/3.12.0a5.rst index 5dc443bb55b617..e5bb9995e726ad 100644 --- a/Misc/NEWS.d/3.12.0a5.rst +++ b/Misc/NEWS.d/3.12.0a5.rst @@ -194,7 +194,7 @@ in memory. .. nonce: Mo3ppp .. section: Library -[Enum] - fix psuedo-flag creation +[Enum] - fix pseudo-flag creation .. diff --git a/Misc/NEWS.d/3.12.0a7.rst b/Misc/NEWS.d/3.12.0a7.rst index f48b9ce0550440..6a416422c54739 100644 --- a/Misc/NEWS.d/3.12.0a7.rst +++ b/Misc/NEWS.d/3.12.0a7.rst @@ -115,7 +115,7 @@ https://github.com/IronLanguages/ironpython3/issues/1667). .. nonce: 0FT2QS .. section: Core and Builtins -Rearrage bits in first field (after header) of PyLongObject. * Bits 0 and 1: +Rearrange bits in first field (after header) of PyLongObject. * Bits 0 and 1: 1 - sign. I.e. 0 for positive numbers, 1 for zero and 2 for negative numbers. * Bit 2 reserved (probably for the immortal bit) * Bits 3+ the unsigned size. diff --git a/Misc/NEWS.d/3.13.0a1.rst b/Misc/NEWS.d/3.13.0a1.rst index c32c9a537d7b53..2973396db2c4fc 100644 --- a/Misc/NEWS.d/3.13.0a1.rst +++ b/Misc/NEWS.d/3.13.0a1.rst @@ -905,7 +905,7 @@ with :envvar:`PYTHONUOPS` or :option:`-X uops <-X>` enabled. Fix potential unaligned memory access on C APIs involving returned sequences of ``char *`` pointers within the :mod:`grp` and :mod:`socket` modules. -These were revealed using a ``-fsaniziter=alignment`` build on ARM macOS. +These were revealed using a ``-fsanitizer=alignment`` build on ARM macOS. Patch by Christopher Chavez. .. diff --git a/Misc/NEWS.d/3.13.0a3.rst b/Misc/NEWS.d/3.13.0a3.rst index 0f8dee261c6589..04e2d56fb7eca7 100644 --- a/Misc/NEWS.d/3.13.0a3.rst +++ b/Misc/NEWS.d/3.13.0a3.rst @@ -2281,7 +2281,7 @@ that's different from english. .. nonce: y8svbF .. section: macOS -Make sure the result of :func:`sysconfig.get_plaform` includes at least a +Make sure the result of :func:`sysconfig.get_platform` includes at least a major and minor versions, even if ``MACOSX_DEPLOYMENT_TARGET`` is set to only a major version during build to match the format expected by pip. diff --git a/Misc/NEWS.d/3.5.3rc1.rst b/Misc/NEWS.d/3.5.3rc1.rst index 2424604249a65c..15f1e08c6bb143 100644 --- a/Misc/NEWS.d/3.5.3rc1.rst +++ b/Misc/NEWS.d/3.5.3rc1.rst @@ -1984,7 +1984,7 @@ Haubenwallner. .. nonce: CLz6qy .. section: Build -Rename --with-optimiations to --enable-optimizations. +Rename --with-optimizations to --enable-optimizations. .. diff --git a/Misc/NEWS.d/3.6.0b4.rst b/Misc/NEWS.d/3.6.0b4.rst index a8e408619af09d..6f85f44a86209b 100644 --- a/Misc/NEWS.d/3.6.0b4.rst +++ b/Misc/NEWS.d/3.6.0b4.rst @@ -314,7 +314,7 @@ Haubenwallner. .. nonce: CLz6qy .. section: Build -Rename --with-optimiations to --enable-optimizations. +Rename --with-optimizations to --enable-optimizations. .. diff --git a/Misc/NEWS.d/3.7.0a1.rst b/Misc/NEWS.d/3.7.0a1.rst index fd6ba07b53a617..2c1f73334670ef 100644 --- a/Misc/NEWS.d/3.7.0a1.rst +++ b/Misc/NEWS.d/3.7.0a1.rst @@ -5310,7 +5310,7 @@ Haubenwallner. .. nonce: CLz6qy .. section: Build -Rename --with-optimiations to --enable-optimizations. +Rename --with-optimizations to --enable-optimizations. .. diff --git a/Misc/NEWS.d/3.8.0a3.rst b/Misc/NEWS.d/3.8.0a3.rst index a06efb9abe795d..a0ef1cc90b4304 100644 --- a/Misc/NEWS.d/3.8.0a3.rst +++ b/Misc/NEWS.d/3.8.0a3.rst @@ -645,7 +645,7 @@ Improve documentation about converting datetime.timedelta to scalars. .. section: Documentation A new entry was added to the Core Language Section of the Programming FAQ, -which explaines the usage of slash(/) in the signature of a function. Patch +which explains the usage of slash(/) in the signature of a function. Patch by Lysandros Nikolaou .. diff --git a/Misc/NEWS.d/3.9.0a1.rst b/Misc/NEWS.d/3.9.0a1.rst index d75132b0aac040..9a65bcb9d67c92 100644 --- a/Misc/NEWS.d/3.9.0a1.rst +++ b/Misc/NEWS.d/3.9.0a1.rst @@ -5717,7 +5717,7 @@ The :c:macro:`METH_FASTCALL` calling convention has been documented. The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to create code objects like :c:func:`!PyCode_New`, but with an extra *posonlyargcount* -parameter for indicating the number of positonal-only arguments. +parameter for indicating the number of positional-only arguments. .. diff --git a/Misc/NEWS.d/3.9.0a6.rst b/Misc/NEWS.d/3.9.0a6.rst index 11309fccc0a20c..ce293ac7881b6b 100644 --- a/Misc/NEWS.d/3.9.0a6.rst +++ b/Misc/NEWS.d/3.9.0a6.rst @@ -634,7 +634,7 @@ script is killed by signal 11, it now logs: "CGI script exit code -11." .. nonce: EGDVQ_ .. section: Library -Improve the error message when triying to import a module using :mod:`runpy` +Improve the error message when trying to import a module using :mod:`runpy` and incorrectly using the ".py" extension at the end of the module name. Patch by Pablo Galindo. diff --git a/Objects/listsort.txt b/Objects/listsort.txt index f387d9c116e502..4413b3f771c714 100644 --- a/Objects/listsort.txt +++ b/Objects/listsort.txt @@ -241,7 +241,7 @@ fly. Their original relative order is restored "by magic" via the final This makes processing descending runs a little more costly. We only use `__lt__` comparisons, so that `x == y` has to be deduced from `not x < y and not y < x`. But so long as a run remains strictly decreasing, -only one of those compares needs to be done per loop iteration. So the primsry +only one of those compares needs to be done per loop iteration. So the primary extra cost is paid only when there are equal elements, and they get some compensating benefit by not needing to end the descending run. diff --git a/Tools/freeze/README b/Tools/freeze/README index 516077bc7daa89..cf28686e151a50 100644 --- a/Tools/freeze/README +++ b/Tools/freeze/README @@ -208,7 +208,7 @@ used, since the standard DLL is used. In order for this to work, you must have built Python using the VC++ (Developer Studio) 5.0 compiler. The provided project builds -python20.lib in the subdirectory pcbuild\Release of thje Python source +python20.lib in the subdirectory pcbuild\Release of the Python source tree, and this is where the generated Makefile expects it to be. If this is not the case, you can edit the Makefile or (probably better) winmakemakefile.py (e.g., if you are using the 4.2 compiler, the diff --git a/Tools/tsan/suppressions_free_threading.txt b/Tools/tsan/suppressions_free_threading.txt index e5eb665ae212de..70736a09999cac 100644 --- a/Tools/tsan/suppressions_free_threading.txt +++ b/Tools/tsan/suppressions_free_threading.txt @@ -4,7 +4,7 @@ # # reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions -## Default build suppresssions +## Default build suppressions race:get_allocator_unlocked race:set_allocator_unlocked