Skip to content

Commit

Permalink
Deploying to gh-pages from @ 99fa2cc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 committed Sep 9, 2024
1 parent 68ed02f commit 2223320
Show file tree
Hide file tree
Showing 627 changed files with 8,170 additions and 7,887 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: cd406a0b73e8d25d9ccf3aa91361322e
config: 037987daf5d6d51af187eb1d02998158
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 2 additions & 2 deletions _sources/c-api/datetime.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ Macros for the convenience of modules implementing the DB API:
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
Create and return a new :class:`datetime.datetime` object given an argument
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`.
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`.
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
Create and return a new :class:`datetime.date` object given an argument
tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.
tuple suitable for passing to :meth:`datetime.date.fromtimestamp`.
2 changes: 1 addition & 1 deletion _sources/c-api/exceptions.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ propagated, additional calls into the Python/C API may not behave as intended
and may fail in mysterious ways.

.. note::
The error indicator is **not** the result of :func:`sys.exc_info()`.
The error indicator is **not** the result of :func:`sys.exc_info`.
The former corresponds to an exception that is not yet caught (and is
therefore still propagating), while the latter returns an exception after
it is caught (and has therefore stopped propagating).
Expand Down
2 changes: 1 addition & 1 deletion _sources/c-api/import.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Importing Modules
.. versionadded:: 3.2
.. versionchanged:: 3.3
Uses :func:`!imp.source_from_cache()` in calculating the source path if
Uses :func:`!imp.source_from_cache` in calculating the source path if
only the bytecode path is provided.
.. versionchanged:: 3.12
No longer uses the removed :mod:`!imp` module.
Expand Down
2 changes: 1 addition & 1 deletion _sources/c-api/init_config.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ PyPreConfig
* Set :c:member:`PyConfig.filesystem_encoding` to ``"mbcs"``,
* Set :c:member:`PyConfig.filesystem_errors` to ``"replace"``.
Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment
Initialized from the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment
variable value.
Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for
Expand Down
2 changes: 1 addition & 1 deletion _sources/deprecations/pending-removal-in-3.13.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ APIs:
* ``read_binary()``
* ``read_text()``

Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
Use :func:`importlib.resources.files` instead. Refer to `importlib-resources: Migrating from Legacy
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)
4 changes: 2 additions & 2 deletions _sources/deprecations/pending-removal-in-3.15.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Pending Removal in Python 3.15
* :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11
and originally planned for removal in Python 3.13 (:gh:`90817`),
but removal has been postponed to Python 3.15.
Use :func:`locale.setlocale()`, :func:`locale.getencoding()` and
:func:`locale.getlocale()` instead.
Use :func:`locale.setlocale`, :func:`locale.getencoding` and
:func:`locale.getlocale` instead.
(Contributed by Hugo van Kemenade in :gh:`111187`.)

* :mod:`pathlib`:
Expand Down
2 changes: 1 addition & 1 deletion _sources/extending/newtypes_tutorial.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Further, the attributes can be deleted, setting the C pointers to ``NULL``. Eve
though we can make sure the members are initialized to non-``NULL`` values, the
members can be set to ``NULL`` if the attributes are deleted.

We define a single method, :meth:`!Custom.name()`, that outputs the objects name as the
We define a single method, :meth:`!Custom.name`, that outputs the objects name as the
concatenation of the first and last names. ::

static PyObject *
Expand Down
2 changes: 1 addition & 1 deletion _sources/faq/programming.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ Not as such.
For simple input parsing, the easiest approach is usually to split the line into
whitespace-delimited words using the :meth:`~str.split` method of string objects
and then convert decimal strings to numeric values using :func:`int` or
:func:`float`. :meth:`!split()` supports an optional "sep" parameter which is useful
:func:`float`. :meth:`!split` supports an optional "sep" parameter which is useful
if the line uses something other than whitespace as a separator.

For more complicated input parsing, regular expressions are more powerful
Expand Down
8 changes: 8 additions & 0 deletions _sources/glossary.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,14 @@ Glossary
:ref:`idle` is a basic editor and interpreter environment
which ships with the standard distribution of Python.

immortal
*Immortal objects* are a CPython implementation detail introduced
in :pep:`683`.

If an object is immortal, its :term:`reference count` is never modified,
and therefore it is never deallocated while the interpreter is running.
For example, :const:`True` and :const:`None` are immortal in CPython.

immutable
An object with a fixed value. Immutable objects include numbers, strings and
tuples. Such an object cannot be altered. A new object has to
Expand Down
4 changes: 2 additions & 2 deletions _sources/howto/descriptor.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ were defined.

Descriptors are a powerful, general purpose protocol. They are the mechanism
behind properties, methods, static methods, class methods, and
:func:`super()`. They are used throughout Python itself. Descriptors
:func:`super`. They are used throughout Python itself. Descriptors
simplify the underlying C code and offer a flexible set of new tools for
everyday Python programs.

Expand Down Expand Up @@ -803,7 +803,7 @@ The full C implementation can be found in :c:func:`!super_getattro` in
Summary of invocation logic
---------------------------

The mechanism for descriptors is embedded in the :meth:`__getattribute__()`
The mechanism for descriptors is embedded in the :meth:`__getattribute__`
methods for :class:`object`, :class:`type`, and :func:`super`.

The important points to remember are:
Expand Down
4 changes: 2 additions & 2 deletions _sources/howto/enum.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Enum HOWTO
.. currentmodule:: enum

An :class:`Enum` is a set of symbolic names bound to unique values. They are
similar to global variables, but they offer a more useful :func:`repr()`,
similar to global variables, but they offer a more useful :func:`repr`,
grouping, type-safety, and a few other features.

They are most useful when you have a variable that can take one of a limited
Expand Down Expand Up @@ -165,7 +165,7 @@ And a function to display the chores for a given day::
answer SO questions

In cases where the actual values of the members do not matter, you can save
yourself some work and use :func:`auto()` for the values::
yourself some work and use :func:`auto` for the values::

>>> from enum import auto
>>> class Weekday(Flag):
Expand Down
2 changes: 1 addition & 1 deletion _sources/howto/instrumentation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Available static markers
.. object:: gc__start(int generation)

Fires when the Python interpreter starts a garbage collection cycle.
``arg0`` is the generation to scan, like :func:`gc.collect()`.
``arg0`` is the generation to scan, like :func:`gc.collect`.

.. object:: gc__done(long collected)

Expand Down
4 changes: 4 additions & 0 deletions _sources/howto/logging.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ Logging Flow
The flow of log event information in loggers and handlers is illustrated in the
following diagram.

.. only:: not html

.. image:: logging_flow.*

.. raw:: html
:file: logging_flow.svg

Expand Down
2 changes: 1 addition & 1 deletion _sources/library/ast.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,7 @@ and classes for traversing abstract syntax trees:
If ``type_comments=True`` is given, the parser is modified to check
and return type comments as specified by :pep:`484` and :pep:`526`.
This is equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the
flags passed to :func:`compile()`. This will report syntax errors
flags passed to :func:`compile`. This will report syntax errors
for misplaced type comments. Without this flag, type comments will
be ignored, and the ``type_comment`` field on selected AST nodes
will always be ``None``. In addition, the locations of ``# type:
Expand Down
8 changes: 4 additions & 4 deletions _sources/library/asyncio-eventloop.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Running and stopping the loop

Run the event loop until :meth:`stop` is called.

If :meth:`stop` is called before :meth:`run_forever()` is called,
If :meth:`stop` is called before :meth:`run_forever` is called,
the loop will poll the I/O selector once with a timeout of zero,
run all callbacks scheduled in response to I/O events (and
those that were already scheduled), and then exit.
Expand Down Expand Up @@ -165,7 +165,7 @@ Running and stopping the loop
.. coroutinemethod:: loop.shutdown_asyncgens()

Schedule all currently open :term:`asynchronous generator` objects to
close with an :meth:`~agen.aclose()` call. After calling this method,
close with an :meth:`~agen.aclose` call. After calling this method,
the event loop will issue a warning if a new asynchronous generator
is iterated. This should be used to reliably finalize all scheduled
asynchronous generators.
Expand Down Expand Up @@ -1386,7 +1386,7 @@ Allows customizing how exceptions are handled in the event loop.

This method should not be overloaded in subclassed
event loops. For custom exception handling, use
the :meth:`set_exception_handler()` method.
the :meth:`set_exception_handler` method.

Enabling debug mode
^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -1469,7 +1469,7 @@ async/await code consider using the high-level
* *stdin* can be any of these:

* a file-like object
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe()`
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe`
* the :const:`subprocess.PIPE` constant (default) which will create a new
pipe and connect it,
* the value ``None`` which will make the subprocess inherit the file
Expand Down
4 changes: 2 additions & 2 deletions _sources/library/asyncio-llapi-index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ See also the main documentation section about the
* - :meth:`loop.close`
- Close the event loop.

* - :meth:`loop.is_running()`
* - :meth:`loop.is_running`
- Return ``True`` if the event loop is running.

* - :meth:`loop.is_closed()`
* - :meth:`loop.is_closed`
- Return ``True`` if the event loop is closed.

* - ``await`` :meth:`loop.shutdown_asyncgens`
Expand Down
2 changes: 1 addition & 1 deletion _sources/library/asyncio-queue.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Queue
Return ``True`` if there are :attr:`maxsize` items in the queue.

If the queue was initialized with ``maxsize=0`` (the default),
then :meth:`full()` never returns ``True``.
then :meth:`full` never returns ``True``.

.. coroutinemethod:: get()

Expand Down
2 changes: 1 addition & 1 deletion _sources/library/asyncio-runner.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Runner context manager
current one. By default :func:`asyncio.new_event_loop` is used and set as
current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.

Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::
Basically, :func:`asyncio.run` example can be rewritten with the runner usage::

async def main():
await asyncio.sleep(1)
Expand Down
14 changes: 14 additions & 0 deletions _sources/library/collections.abc.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ Collections Abstract Base Classes -- Detailed Descriptions

ABC for classes that provide the :meth:`~object.__call__` method.

See :ref:`annotating-callables` for details on how to use
:class:`!Callable` in type annotations.

.. class:: Iterable

ABC for classes that provide the :meth:`~container.__iter__` method.
Expand Down Expand Up @@ -253,6 +256,9 @@ Collections Abstract Base Classes -- Detailed Descriptions
:meth:`~generator.send`,
:meth:`~generator.throw` and :meth:`~generator.close` methods.

See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!Generator` in type annotations.

.. versionadded:: 3.5

.. class:: Sequence
Expand Down Expand Up @@ -331,6 +337,11 @@ Collections Abstract Base Classes -- Detailed Descriptions
Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``.
Use :func:`inspect.isawaitable` to detect them.

See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!Coroutine` in type annotations.
The variance and order of type parameters correspond to those of
:class:`Generator`.

.. versionadded:: 3.5

.. class:: AsyncIterable
Expand All @@ -352,6 +363,9 @@ Collections Abstract Base Classes -- Detailed Descriptions
ABC for :term:`asynchronous generator` classes that implement the protocol
defined in :pep:`525` and :pep:`492`.

See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!AsyncGenerator` in type annotations.

.. versionadded:: 3.6

.. class:: Buffer
Expand Down
2 changes: 1 addition & 1 deletion _sources/library/compileall.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ compile Python sources.
.. option:: -j N

Use *N* workers to compile the files within the given directory.
If ``0`` is used, then the result of :func:`os.cpu_count()`
If ``0`` is used, then the result of :func:`os.cpu_count`
will be used.

.. option:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
Expand Down
4 changes: 2 additions & 2 deletions _sources/library/configparser.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ ConfigParser Objects
When *converters* is given, it should be a dictionary where each key
represents the name of a type converter and each value is a callable
implementing the conversion from string to the desired datatype. Every
converter gets its own corresponding :meth:`!get*()` method on the parser
converter gets its own corresponding :meth:`!get*` method on the parser
object and section proxies.

It is possible to read several configurations into a single
Expand Down Expand Up @@ -1000,7 +1000,7 @@ ConfigParser Objects
The *converters* argument was added.

.. versionchanged:: 3.7
The *defaults* argument is read with :meth:`read_dict()`,
The *defaults* argument is read with :meth:`read_dict`,
providing consistent behavior across the parser: non-string
keys and values are implicitly converted to strings.

Expand Down
9 changes: 9 additions & 0 deletions _sources/library/constants.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ A small number of constants live in the built-in namespace. They are:
:exc:`SyntaxError`), so they can be considered "true" constants.


.. _site-consts:

Constants added by the :mod:`site` module
-----------------------------------------

Expand All @@ -94,6 +96,13 @@ should not be used in programs.
(i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
specified exit code.

.. data:: help
:noindex:

Object that when printed, prints the message "Type help() for interactive
help, or help(object) for help about object.", and when called,
acts as described :func:`elsewhere <help>`.

.. data:: copyright
credits

Expand Down
14 changes: 8 additions & 6 deletions _sources/library/contextvars.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function and the :class:`~contextvars.Context` class should be used to
manage the current context in asynchronous frameworks.

Context managers that have state should use Context Variables
instead of :func:`threading.local()` to prevent their state from
instead of :func:`threading.local` to prevent their state from
bleeding to other code unexpectedly, when used in concurrent code.

See also :pep:`567` for additional details.
Expand Down Expand Up @@ -146,7 +146,7 @@ Manual Context Management

Every thread will have a different top-level :class:`~contextvars.Context`
object. This means that a :class:`ContextVar` object behaves in a similar
fashion to :func:`threading.local()` when values are assigned in different
fashion to :func:`threading.local` when values are assigned in different
threads.

Context implements the :class:`collections.abc.Mapping` interface.
Expand Down Expand Up @@ -254,7 +254,7 @@ client::
# without passing it explicitly to this function.

client_addr = client_addr_var.get()
return f'Good bye, client @ {client_addr}\n'.encode()
return f'Good bye, client @ {client_addr}\r\n'.encode()

async def handle_request(reader, writer):
addr = writer.transport.get_extra_info('socket').getpeername()
Expand All @@ -268,9 +268,10 @@ client::
print(line)
if not line.strip():
break
writer.write(line)

writer.write(render_goodbye())
writer.write(b'HTTP/1.1 200 OK\r\n') # status line
writer.write(b'\r\n') # headers
writer.write(render_goodbye()) # body
writer.close()

async def main():
Expand All @@ -282,5 +283,6 @@ client::

asyncio.run(main())

# To test it you can use telnet:
# To test it you can use telnet or curl:
# telnet 127.0.0.1 8081
# curl 127.0.0.1:8081
Loading

0 comments on commit 2223320

Please sign in to comment.