Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stability. In order to maintain this reputation, the developers would like to
know of any deficiencies you find in Python.

It can be sometimes faster to fix bugs yourself and contribute patches to
Python as it streamlines the process and involves less people. Learn how to
Python as it streamlines the process and involves fewer people. Learn how to
:ref:`contribute <contributing-to-python>`.

Documentation bugs
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Floating-Point Objects

.. c:macro:: Py_INFINITY

This macro expands a to constant expression of type :c:expr:`double`, that
This macro expands to a constant expression of type :c:expr:`double`, that
represents the positive infinity.

It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard
Expand All @@ -92,7 +92,7 @@ Floating-Point Objects

.. c:macro:: Py_NAN

This macro expands a to constant expression of type :c:expr:`double`, that
This macro expands to a constant expression of type :c:expr:`double`, that
represents a quiet not-a-number (qNaN) value.

On most platforms, this is equivalent to the :c:macro:`!NAN` macro from
Expand Down
8 changes: 4 additions & 4 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Initializing and finalizing the interpreter
Note that Python will do a best effort at freeing all memory allocated by the Python
interpreter. Therefore, any C-Extension should make sure to correctly clean up all
of the preveiously allocated PyObjects before using them in subsequent calls to
of the previously allocated PyObjects before using them in subsequent calls to
:c:func:`Py_Initialize`. Otherwise it could introduce vulnerabilities and incorrect
behavior.
Expand Down Expand Up @@ -1407,7 +1407,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
Get the current interpreter.
Issue a fatal error if there no :term:`attached thread state`.
Issue a fatal error if there is no :term:`attached thread state`.
It cannot return NULL.
.. versionadded:: 3.9
Expand Down Expand Up @@ -1979,7 +1979,7 @@ Python-level trace functions in previous versions.
*what* when after any bytecode is processed after which the exception becomes
set within the frame being executed. The effect of this is that as exception
propagation causes the Python stack to unwind, the callback is called upon
return to each frame as the exception propagates. Only trace functions receives
return to each frame as the exception propagates. Only trace functions receive
these events; they are not needed by the profiler.
Expand Down Expand Up @@ -2119,7 +2119,7 @@ Reference tracing
the tracer function is called. Return ``0`` on success. Set an exception and
return ``-1`` on error.
Not that tracer functions **must not** create Python objects inside or
Note that tracer functions **must not** create Python objects inside or
otherwise the call will be re-entrant. The tracer also **must not** clear
any existing exception or set an exception. A :term:`thread state` will be active
every time the tracer function is called.
Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/init_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,9 @@ Configuration Options

Visibility:

* Public: Can by get by :c:func:`PyConfig_Get` and set by
* Public: Can be retrieved by :c:func:`PyConfig_Get` and set by
:c:func:`PyConfig_Set`.
* Read-only: Can by get by :c:func:`PyConfig_Get`, but cannot be set by
* Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set by
:c:func:`PyConfig_Set`.


Expand Down Expand Up @@ -1153,7 +1153,7 @@ PyConfig

Most ``PyConfig`` methods :ref:`preinitialize Python <c-preinit>` if needed.
In that case, the Python preinitialization configuration
(:c:type:`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration
(:c:type:`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration
fields which are in common with :c:type:`PyPreConfig` are tuned, they must
be set before calling a :c:type:`PyConfig` method:

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Docstring macros
General utility macros
----------------------

The following macros common tasks not specific to Python.
The following macros are for common tasks not specific to Python.

.. c:macro:: Py_UNUSED(arg)
Expand Down Expand Up @@ -317,7 +317,7 @@ Assertion utilities
In debug mode, and on unsupported compilers, the macro expands to a call to
:c:func:`Py_FatalError`.

A use for ``Py_UNREACHABLE()`` is following a call a function that
A use for ``Py_UNREACHABLE()`` is following a call to a function that
never returns but that is not declared ``_Noreturn``.

If a code path is very unlikely code but can be reached under exceptional
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ remove it.
.. versionchanged:: 3.9

:c:member:`m_traverse`, :c:member:`m_clear` and :c:member:`m_free`
functions are longer called before the module state is allocated.
functions are no longer called before the module state is allocated.


.. _moduledef-dynamic:
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ There are these calling conventions:


These two constants are not used to indicate the calling convention but the
binding when use with methods of classes. These may not be used for functions
binding when used with methods of classes. These may not be used for functions
defined for modules. At most one of these flags may be set for any given
method.

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/veryhigh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ the same library that the Python runtime is using.
objects *globals* and *locals* with the compiler flags specified by
*flags*. *globals* must be a dictionary; *locals* can be any object
that implements the mapping protocol. The parameter *start* specifies
the start symbol and must one of the :ref:`available start symbols <start-symbols>`.
the start symbol and must be one of the :ref:`available start symbols <start-symbols>`.

Returns the result of executing the code as a Python object, or ``NULL`` if an
exception was raised.
Expand Down
2 changes: 1 addition & 1 deletion Doc/deprecations/pending-removal-in-3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Pending removal in Python 3.15

* :func:`~threading.RLock` will take no arguments in Python 3.15.
Passing any arguments has been deprecated since Python 3.14,
as the Python version does not permit any arguments,
as the Python version does not permit any arguments,
but the C version allows any number of positional or keyword arguments,
ignoring every argument.

Expand Down
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ Glossary
'email.mime.text'

race condition
A condition of a program where the its behavior
A condition of a program where the behavior
depends on the relative timing or ordering of events, particularly in
multi-threaded programs. Race conditions can lead to
:term:`non-deterministic` behavior and bugs that are difficult to
Expand Down
10 changes: 5 additions & 5 deletions Doc/library/mailbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
.. method:: remove_flag(flag)

Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* maybe a string of more than
remove more than one flag at a time, *flag* may be a string of more than
one character. If "info" contains experimental information rather than
flags, the current "info" is not modified.

Expand Down Expand Up @@ -1190,7 +1190,7 @@ When a :class:`!MaildirMessage` instance is created based upon a
.. method:: remove_flag(flag)

Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* maybe a string of more than
remove more than one flag at a time, *flag* may be a string of more than
one character.

When an :class:`!mboxMessage` instance is created based upon a
Expand Down Expand Up @@ -1562,7 +1562,7 @@ When a :class:`!BabylMessage` instance is created based upon an
.. method:: remove_flag(flag)

Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* maybe a string of more than
remove more than one flag at a time, *flag* may be a string of more than
one character.

When an :class:`!MMDFMessage` instance is created based upon a
Expand Down Expand Up @@ -1641,7 +1641,7 @@ The following exception classes are defined in the :mod:`!mailbox` module:

.. exception:: Error()

The based class for all other module-specific exceptions.
The base class for all other module-specific exceptions.


.. exception:: NoSuchMailboxError()
Expand All @@ -1661,7 +1661,7 @@ The following exception classes are defined in the :mod:`!mailbox` module:

Raised when some mailbox-related condition beyond the control of the program
causes it to be unable to proceed, such as when failing to acquire a lock that
another program already holds a lock, or when a uniquely generated file name
another program already holds, or when a uniquely generated file name
already exists.


Expand Down
4 changes: 2 additions & 2 deletions Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ Miscellaneous

Set the path of the Python interpreter to use when starting a child process.
(By default :data:`sys.executable` is used). Embedders will probably need to
do some thing like ::
do something like ::

set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))

Expand Down Expand Up @@ -2473,7 +2473,7 @@ with the :class:`Pool` class.
duration of the Pool's work queue. A frequent pattern found in other
systems (such as Apache, mod_wsgi, etc) to free resources held by
workers is to allow a worker within a pool to complete only a set
amount of work before being exiting, being cleaned up and a new
amount of work before exiting, being cleaned up and a new
process spawned to replace the old one. The *maxtasksperchild*
argument to the :class:`Pool` exposes this ability to the end user.

Expand Down
10 changes: 5 additions & 5 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Python UTF-8 Mode
.. versionchanged:: 3.15

Python UTF-8 mode is now enabled by default (:pep:`686`).
It may be disabled with by setting :envvar:`PYTHONUTF8=0 <PYTHONUTF8>` as
It may be disabled by setting :envvar:`PYTHONUTF8=0 <PYTHONUTF8>` as
an environment variable or by using the :option:`-X utf8=0 <-X>` command line option.

The Python UTF-8 Mode ignores the :term:`locale encoding` and forces the usage
Expand Down Expand Up @@ -254,7 +254,7 @@ process and user.

.. warning::
This function is not thread-safe. Calling it while the environment is
being modified in an other thread is an undefined behavior. Reading from
being modified in another thread is an undefined behavior. Reading from
:data:`os.environ` or :data:`os.environb`, or calling :func:`os.getenv`
while reloading, may return an empty result.

Expand Down Expand Up @@ -4371,7 +4371,7 @@ Naturally, they are all only available on Linux.
except it includes any time that the system is suspended.

The file descriptor's behaviour can be modified by specifying a *flags* value.
Any of the following variables may used, combined using bitwise OR
Any of the following variables may be used, combined using bitwise OR
(the ``|`` operator):

- :const:`TFD_NONBLOCK`
Expand Down Expand Up @@ -4403,7 +4403,7 @@ Naturally, they are all only available on Linux.
*fd* must be a valid timer file descriptor.

The timer's behaviour can be modified by specifying a *flags* value.
Any of the following variables may used, combined using bitwise OR
Any of the following variables may be used, combined using bitwise OR
(the ``|`` operator):

- :const:`TFD_TIMER_ABSTIME`
Expand Down Expand Up @@ -4472,7 +4472,7 @@ Naturally, they are all only available on Linux.

Return a two-item tuple of floats (``next_expiration``, ``interval``).

``next_expiration`` denotes the relative time until next the timer next fires,
``next_expiration`` denotes the relative time until the timer next fires,
regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set.

``interval`` denotes the timer's interval.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/pickle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ The following types can be pickled:

* classes accessible from the top level of a module;

* instances of such classes whose the result of calling :meth:`~object.__getstate__`
* instances of such classes for which the result of calling :meth:`~object.__getstate__`
is picklable (see section :ref:`pickle-inst` for details).

Attempts to pickle unpicklable objects will raise the :exc:`PicklingError`
Expand Down Expand Up @@ -588,7 +588,7 @@ methods:

.. method:: object.__getnewargs_ex__()

In protocols 2 and newer, classes that implements the
In protocols 2 and newer, classes that implement the
:meth:`__getnewargs_ex__` method can dictate the values passed to the
:meth:`__new__` method upon unpickling. The method must return a pair
``(args, kwargs)`` where *args* is a tuple of positional arguments
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/pyexpat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ otherwise stated.
...``). The *doctypeName* is provided exactly as presented. The *systemId* and
*publicId* parameters give the system and public identifiers if specified, or
``None`` if omitted. *has_internal_subset* will be true if the document
contains and internal document declaration subset. This requires Expat version
contains an internal document declaration subset. This requires Expat version
1.2 or newer.


Expand Down
4 changes: 2 additions & 2 deletions Doc/library/resource.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ These functions are used to retrieve resource usage information:
print(getrusage(RUSAGE_SELF))

The fields of the return value each describe how a particular system resource
has been used, e.g. amount of time spent running is user mode or number of times
has been used, e.g. amount of time spent running in user mode or number of times
the process was swapped out of main memory. Some values are dependent on the
clock tick internal, e.g. the amount of memory the process is using.
clock tick interval, e.g. the amount of memory the process is using.
Copy link
Member

@AlexWaygood AlexWaygood Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this definitely meant to be "interval" rather than "internals"? (If we're not sure, I'd just revert this change for now.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! The original text was actually clock tick internal (not "internals"), so the choice was between "interval" and "internal". "Clock tick interval" is standard Unix/POSIX terminology — it refers to the duration between system clock ticks. The sentence reads: "Some values are dependent on the clock tick interval, e.g. the amount of memory the process is using." That lines up with how getrusage(2) works, where certain resource measurements are quantized to clock tick boundaries.

Happy to revert if you'd prefer to be cautious though!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that makes sense to me, thanks for checking!


For backward compatibility, the return value is also accessible as a tuple of 16
elements.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ argument to the various ``token_*`` functions. That argument is taken
as the number of bytes of randomness to use.

Otherwise, if no argument is provided, or if the argument is ``None``,
the ``token_*`` functions uses :const:`DEFAULT_ENTROPY` instead.
the ``token_*`` functions use :const:`DEFAULT_ENTROPY` instead.

.. data:: DEFAULT_ENTROPY

Expand Down
10 changes: 5 additions & 5 deletions Doc/library/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
The minimum number of bytes which can be written without blocking to a pipe
when the pipe has been reported as ready for writing by :func:`~select.select`,
:func:`!poll` or another interface in this module. This doesn't apply
to other kind of file-like objects such as sockets.
to other kinds of file-like objects such as sockets.

This value is guaranteed by POSIX to be at least 512.

Expand Down Expand Up @@ -225,8 +225,8 @@
:meth:`~io.IOBase.fileno` method that returns an integer. File objects
implement :meth:`!fileno`, so they can also be used as the argument.

*eventmask* is an optional bitmask describing the type of events you want to

Check warning on line 228 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: POLLOUT [ref.const]

Check warning on line 228 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: POLLPRI [ref.const]

Check warning on line 228 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: POLLIN [ref.const]
check for. The constants are the same that with :c:func:`!poll`
check for. The constants are the same as with :c:func:`!poll`
object. The default value is a combination of the constants :const:`POLLIN`,
:const:`POLLPRI`, and :const:`POLLOUT`.

Expand All @@ -241,7 +241,7 @@
.. method:: devpoll.modify(fd[, eventmask])

This method does an :meth:`unregister` followed by a
:meth:`register`. It is (a bit) more efficient that doing the same
:meth:`register`. It is (a bit) more efficient than doing the same
explicitly.


Expand Down Expand Up @@ -577,19 +577,19 @@
| Constant | Meaning |
+===========================+=============================================+
| :const:`KQ_EV_ADD` | Adds or modifies an event |
+---------------------------+---------------------------------------------+

Check warning on line 580 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_ADD [ref.const]
| :const:`KQ_EV_DELETE` | Removes an event from the queue |
+---------------------------+---------------------------------------------+

Check warning on line 582 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_DELETE [ref.const]
| :const:`KQ_EV_ENABLE` | Permitscontrol() to returns the event |
| :const:`KQ_EV_ENABLE` | Permits control() to return the event |
+---------------------------+---------------------------------------------+

Check warning on line 584 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_ENABLE [ref.const]
| :const:`KQ_EV_DISABLE` | Disablesevent |
| :const:`KQ_EV_DISABLE` | Disables event |
+---------------------------+---------------------------------------------+

Check warning on line 586 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_DISABLE [ref.const]
| :const:`KQ_EV_ONESHOT` | Removes event after first occurrence |
+---------------------------+---------------------------------------------+

Check warning on line 588 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_ONESHOT [ref.const]
| :const:`KQ_EV_CLEAR` | Reset the state after an event is retrieved |
+---------------------------+---------------------------------------------+

Check warning on line 590 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_CLEAR [ref.const]
| :const:`KQ_EV_SYSFLAGS` | internal event |
+---------------------------+---------------------------------------------+

Check warning on line 592 in Doc/library/select.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:const reference target not found: KQ_EV_SYSFLAGS [ref.const]
| :const:`KQ_EV_FLAG1` | internal event |
+---------------------------+---------------------------------------------+
| :const:`KQ_EV_EOF` | Filter specific EOF condition |
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/selectors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Classes hierarchy::


In the following, *events* is a bitwise mask indicating which I/O events should
be waited for on a given file object. It can be a combination of the modules
be waited for on a given file object. It can be a combination of the module's
constants below:

+-----------------------+-----------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/shelve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ lots of shared sub-objects. The keys are ordinary strings.
:term:`bytes-like object`; the *protocol* value may be ignored by the
serializer.

The *deserializer* argument must be callable which takes a serialized object
The *deserializer* argument must be a callable which takes a serialized object
given as a :class:`bytes` object and returns the corresponding object.

A :exc:`ShelveError` is raised if *serializer* is given but *deserializer*
Expand Down Expand Up @@ -85,7 +85,7 @@ lots of shared sub-objects. The keys are ordinary strings.
to load a shelf from an untrusted source. Like with pickle, loading a shelf
can execute arbitrary code.

Shelf objects support most of methods and operations supported by dictionaries
Shelf objects support most of the methods and operations supported by dictionaries
(except copying, constructors and operators ``|`` and ``|=``). This eases the
transition from dictionary based scripts to those requiring persistent storage.

Expand Down
6 changes: 3 additions & 3 deletions Doc/library/shlex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ variables which either control lexical analysis or can be used for debugging:
Parsing Rules
-------------

When operating in non-POSIX mode, :class:`~shlex.shlex` will try to obey to the
When operating in non-POSIX mode, :class:`~shlex.shlex` will try to obey the
following rules.

* Quote characters are not recognized within words (``Do"Not"Separate`` is
Expand All @@ -366,7 +366,7 @@ following rules.

* It's not possible to parse empty strings, even if quoted.

When operating in POSIX mode, :class:`~shlex.shlex` will try to obey to the
When operating in POSIX mode, :class:`~shlex.shlex` will try to obey the
following parsing rules.

* Quotes are stripped out, and do not separate words (``"Do"Not"Separate"`` is
Expand All @@ -382,7 +382,7 @@ following parsing rules.
* Enclosing characters in quotes which are part of
:attr:`~shlex.escapedquotes` (e.g. ``'"'``) preserves the literal value
of all characters within the quotes, with the exception of the characters
mentioned in :attr:`~shlex.escape`. The escape characters retain its
mentioned in :attr:`~shlex.escape`. The escape characters retain their
special meaning only when followed by the quote in use, or the escape
character itself. Otherwise the escape character will be considered a
normal character.
Expand Down
Loading
Loading