Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f09911

Browse files
committed
Deploying to gh-pages from @ a63aec6 🚀
1 parent aca9447 commit 1f09911

File tree

557 files changed

+2413
-1604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

557 files changed

+2413
-1604
lines changed

_sources/c-api/allocation.rst.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ Allocating Objects on the Heap
1515
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
1616
1717
Initialize a newly allocated object *op* with its type and initial
18-
reference. Returns the initialized object. If *type* indicates that the
19-
object participates in the cyclic garbage detector, it is added to the
20-
detector's set of observed objects. Other fields of the object are not
21-
affected.
18+
reference. Returns the initialized object. Other fields of the object are
19+
not affected.
2220
2321
2422
.. c:function:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)

_sources/c-api/typeobj.rst.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,7 @@ This is done by filling a :c:type:`PyType_Spec` structure and calling
22012201
.. _number-structs:
22022202

22032203
Number Object Structures
2204-
========================
2204+
------------------------
22052205

22062206
.. sectionauthor:: Amaury Forgeot d'Arc
22072207

@@ -2315,7 +2315,7 @@ Number Object Structures
23152315
.. _mapping-structs:
23162316

23172317
Mapping Object Structures
2318-
=========================
2318+
-------------------------
23192319

23202320
.. sectionauthor:: Amaury Forgeot d'Arc
23212321

@@ -2352,7 +2352,7 @@ Mapping Object Structures
23522352
.. _sequence-structs:
23532353

23542354
Sequence Object Structures
2355-
==========================
2355+
--------------------------
23562356

23572357
.. sectionauthor:: Amaury Forgeot d'Arc
23582358

@@ -2432,7 +2432,7 @@ Sequence Object Structures
24322432
.. _buffer-structs:
24332433

24342434
Buffer Object Structures
2435-
========================
2435+
------------------------
24362436

24372437
.. sectionauthor:: Greg J. Stein <[email protected]>
24382438
.. sectionauthor:: Benjamin Peterson
@@ -2527,7 +2527,7 @@ Buffer Object Structures
25272527

25282528

25292529
Async Object Structures
2530-
=======================
2530+
-----------------------
25312531

25322532
.. sectionauthor:: Yury Selivanov <[email protected]>
25332533

@@ -2595,7 +2595,7 @@ Async Object Structures
25952595
.. _slot-typedefs:
25962596

25972597
Slot Type typedefs
2598-
==================
2598+
------------------
25992599

26002600
.. c:type:: PyObject *(*allocfunc)(PyTypeObject *cls, Py_ssize_t nitems)
26012601
@@ -2704,7 +2704,7 @@ Slot Type typedefs
27042704
.. _typedef-examples:
27052705

27062706
Examples
2707-
========
2707+
--------
27082708

27092709
The following are simple examples of Python type definitions. They
27102710
include common usage you may encounter. Some demonstrate tricky corner

_sources/deprecations/pending-removal-in-3.14.rst.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
Pending Removal in Python 3.14
22
------------------------------
33

4-
* The import system:
5-
6-
* Setting :attr:`~module.__loader__` on a module while
7-
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
8-
is deprecated. In Python 3.14, :attr:`!__loader__` will cease to be set or
9-
taken into consideration by the import system or the standard library.
10-
114
* :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
125
of :class:`!argparse.BooleanOptionalAction` are deprecated
136
and will be removed in 3.14.
@@ -103,16 +96,6 @@ Pending Removal in Python 3.14
10396
if :ref:`named placeholders <sqlite3-placeholders>` are used and
10497
*parameters* is a sequence instead of a :class:`dict`.
10598

106-
* date and datetime adapter, date and timestamp converter:
107-
see the :mod:`sqlite3` documentation for suggested replacement recipes.
108-
109-
* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
110-
deprecated in :pep:`626`
111-
since 3.10 and was planned to be removed in 3.12,
112-
but it only got a proper :exc:`DeprecationWarning` in 3.12.
113-
May be removed in 3.14.
114-
(Contributed by Nikita Sobolev in :gh:`101866`.)
115-
11699
* :mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9,
117100
now causes a :exc:`DeprecationWarning` to be emitted when it is used.
118101

_sources/deprecations/pending-removal-in-3.15.rst.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ Pending Removal in Python 3.15
5959
but the C version allows any number of positional or keyword arguments,
6060
ignoring every argument.
6161

62+
* :mod:`types`:
63+
64+
* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
65+
deprecated in :pep:`626`
66+
since 3.10 and was planned to be removed in 3.12,
67+
but it only got a proper :exc:`DeprecationWarning` in 3.12.
68+
May be removed in 3.15.
69+
(Contributed by Nikita Sobolev in :gh:`101866`.)
70+
6271
* :mod:`typing`:
6372

6473
* The undocumented keyword argument syntax for creating

_sources/deprecations/pending-removal-in-3.16.rst.txt

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
Pending Removal in Python 3.16
1+
Pending removal in Python 3.16
22
------------------------------
33

4-
* :mod:`builtins`:
4+
* The import system:
55

6-
* Bitwise inversion on boolean types, ``~True`` or ``~False``
7-
has been deprecated since Python 3.12,
8-
as it produces surprising and unintuitive results (``-2`` and ``-1``).
9-
Use ``not x`` instead for the logical negation of a Boolean.
10-
In the rare case that you need the bitwise inversion of
11-
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
6+
* Setting :attr:`~module.__loader__` on a module while
7+
failing to set :attr:`__spec__.loader <importlib.machinery.ModuleSpec.loader>`
8+
is deprecated. In Python 3.16, :attr:`!__loader__` will cease to be set or
9+
taken into consideration by the import system or the standard library.
1210

1311
* :mod:`array`:
1412

@@ -18,6 +16,22 @@ Pending Removal in Python 3.16
1816
Use the ``'w'`` format code (:c:type:`Py_UCS4`)
1917
for Unicode characters instead.
2018

19+
* :mod:`asyncio`:
20+
21+
* :func:`!asyncio.iscoroutinefunction` is deprecated
22+
and will be removed in Python 3.16,
23+
use :func:`inspect.iscoroutinefunction` instead.
24+
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
25+
26+
* :mod:`builtins`:
27+
28+
* Bitwise inversion on boolean types, ``~True`` or ``~False``
29+
has been deprecated since Python 3.12,
30+
as it produces surprising and unintuitive results (``-2`` and ``-1``).
31+
Use ``not x`` instead for the logical negation of a Boolean.
32+
In the rare case that you need the bitwise inversion of
33+
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
34+
2135
* :mod:`shutil`:
2236

2337
* The :class:`!ExecError` exception

_sources/glossary.rst.txt

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,19 +260,33 @@ Glossary
260260
advanced mathematical feature. If you're not aware of a need for them,
261261
it's almost certain you can safely ignore them.
262262

263+
context
264+
This term has different meanings depending on where and how it is used.
265+
Some common meanings:
266+
267+
* The temporary state or environment established by a :term:`context
268+
manager` via a :keyword:`with` statement.
269+
* The collection of key­value bindings associated with a particular
270+
:class:`contextvars.Context` object and accessed via
271+
:class:`~contextvars.ContextVar` objects. Also see :term:`context
272+
variable`.
273+
* A :class:`contextvars.Context` object. Also see :term:`current
274+
context`.
275+
276+
context management protocol
277+
The :meth:`~object.__enter__` and :meth:`~object.__exit__` methods called
278+
by the :keyword:`with` statement. See :pep:`343`.
279+
263280
context manager
264-
An object which controls the environment seen in a :keyword:`with`
265-
statement by defining :meth:`~object.__enter__` and :meth:`~object.__exit__` methods.
266-
See :pep:`343`.
281+
An object which implements the :term:`context management protocol` and
282+
controls the environment seen in a :keyword:`with` statement. See
283+
:pep:`343`.
267284

268285
context variable
269-
A variable which can have different values depending on its context.
270-
This is similar to Thread-Local Storage in which each execution
271-
thread may have a different value for a variable. However, with context
272-
variables, there may be several contexts in one execution thread and the
273-
main usage for context variables is to keep track of variables in
286+
A variable whose value depends on which context is the :term:`current
287+
context`. Values are accessed via :class:`contextvars.ContextVar`
288+
objects. Context variables are primarily used to isolate state between
274289
concurrent asynchronous tasks.
275-
See :mod:`contextvars`.
276290

277291
contiguous
278292
.. index:: C-contiguous, Fortran contiguous
@@ -306,6 +320,14 @@ Glossary
306320
is used when necessary to distinguish this implementation from others
307321
such as Jython or IronPython.
308322

323+
current context
324+
The :term:`context` (:class:`contextvars.Context` object) that is
325+
currently used by :class:`~contextvars.ContextVar` objects to access (get
326+
or set) the values of :term:`context variables <context variable>`. Each
327+
thread has its own current context. Frameworks for executing asynchronous
328+
tasks (see :mod:`asyncio`) associate each task with a context which
329+
becomes the current context whenever the task starts or resumes execution.
330+
309331
decorator
310332
A function returning another function, usually applied as a function
311333
transformation using the ``@wrapper`` syntax. Common examples for

_sources/howto/logging-cookbook.rst.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,11 +1267,8 @@ to adapt in your own applications.
12671267

12681268
You could also write your own handler which uses the :class:`~multiprocessing.Lock`
12691269
class from the :mod:`multiprocessing` module to serialize access to the
1270-
file from your processes. The existing :class:`FileHandler` and subclasses do
1271-
not make use of :mod:`multiprocessing` at present, though they may do so in the
1272-
future. Note that at present, the :mod:`multiprocessing` module does not provide
1273-
working lock functionality on all platforms (see
1274-
https://bugs.python.org/issue3770).
1270+
file from your processes. The stdlib :class:`FileHandler` and subclasses do
1271+
not make use of :mod:`multiprocessing`.
12751272

12761273
.. currentmodule:: logging.handlers
12771274

0 commit comments

Comments
 (0)