Skip to content

Commit ecc0be0

Browse files
Deploy preview for PR 1133 🛫
1 parent 74b2775 commit ecc0be0

File tree

561 files changed

+733
-670
lines changed

Some content is hidden

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

561 files changed

+733
-670
lines changed

pr-preview/pr-1133/_sources/library/asyncio-eventloop.rst.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ clocks to track time.
298298
custom :class:`contextvars.Context` for the *callback* to run in.
299299
The current context is used when no *context* is provided.
300300

301+
.. note::
302+
303+
For performance, callbacks scheduled with :meth:`loop.call_later`
304+
may run up to one clock-resolution early (see
305+
``time.get_clock_info('monotonic').resolution``).
306+
301307
.. versionchanged:: 3.7
302308
The *context* keyword-only parameter was added. See :pep:`567`
303309
for more details.
@@ -318,6 +324,12 @@ clocks to track time.
318324
An instance of :class:`asyncio.TimerHandle` is returned which can
319325
be used to cancel the callback.
320326

327+
.. note::
328+
329+
For performance, callbacks scheduled with :meth:`loop.call_at`
330+
may run up to one clock-resolution early (see
331+
``time.get_clock_info('monotonic').resolution``).
332+
321333
.. versionchanged:: 3.7
322334
The *context* keyword-only parameter was added. See :pep:`567`
323335
for more details.

pr-preview/pr-1133/_sources/library/dbm.rst.txt

Lines changed: 66 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ the Oracle Berkeley DB.
8484
.. versionchanged:: 3.11
8585
*file* accepts a :term:`path-like object`.
8686

87-
The object returned by :func:`~dbm.open` supports the same basic functionality as a
88-
:class:`dict`; keys and their corresponding values can be stored, retrieved, and
89-
deleted, and the :keyword:`in` operator and the :meth:`!keys` method are
90-
available, as well as :meth:`!get` and :meth:`!setdefault` methods.
87+
The object returned by :func:`~dbm.open` supports the basic
88+
functionality of mutable :term:`mappings <mapping>`;
89+
keys and their corresponding values can be stored, retrieved, and
90+
deleted, and iteration, the :keyword:`in` operator and methods :meth:`!keys`,
91+
:meth:`!get`, :meth:`!setdefault` and :meth:`!clear` are available.
92+
The :meth:`!keys` method returns a list instead of a view object.
93+
The :meth:`!setdefault` method requires two arguments.
9194

9295
Key and values are always stored as :class:`bytes`. This means that when
9396
strings are used they are implicitly converted to the default encoding before
@@ -108,6 +111,10 @@ will automatically close them when done.
108111
Deleting a key from a read-only database raises a database module specific exception
109112
instead of :exc:`KeyError`.
110113

114+
.. versionchanged:: 3.13
115+
:meth:`!clear` methods are now available for all :mod:`dbm` backends.
116+
117+
111118
The following example records some hostnames and a corresponding title, and
112119
then prints out the contents of the database::
113120

@@ -167,9 +174,6 @@ or any other SQLite browser, including the SQLite CLI.
167174
.. function:: open(filename, /, flag="r", mode=0o666)
168175

169176
Open an SQLite database.
170-
The returned object behaves like a :term:`mapping`,
171-
implements a :meth:`!close` method,
172-
and supports a "closing" context manager via the :keyword:`with` keyword.
173177

174178
:param filename:
175179
The path to the database to be opened.
@@ -186,6 +190,17 @@ or any other SQLite browser, including the SQLite CLI.
186190
The Unix file access mode of the file (default: octal ``0o666``),
187191
used only when the database has to be created.
188192

193+
The returned database object behaves similar to a mutable :term:`mapping`,
194+
but the :meth:`!keys` method returns a list, and
195+
the :meth:`!setdefault` method requires two arguments.
196+
It also supports a "closing" context manager via the :keyword:`with` keyword.
197+
198+
The following method is also provided:
199+
200+
.. method:: sqlite3.close()
201+
202+
Close the SQLite database.
203+
189204

190205
:mod:`dbm.gnu` --- GNU database manager
191206
---------------------------------------
@@ -215,6 +230,11 @@ functionality like crash tolerance.
215230
raised for general mapping errors like specifying an incorrect key.
216231

217232

233+
.. data:: open_flags
234+
235+
A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` supports.
236+
237+
218238
.. function:: open(filename, flag="r", mode=0o666, /)
219239

220240
Open a GDBM database and return a :class:`!gdbm` object.
@@ -250,14 +270,25 @@ functionality like crash tolerance.
250270
.. versionchanged:: 3.11
251271
*filename* accepts a :term:`path-like object`.
252272

253-
.. data:: open_flags
273+
:class:`!gdbm` objects behave similar to mutable :term:`mappings <mapping>`,
274+
but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`,
275+
and :meth:`!update` are not supported,
276+
the :meth:`!keys` method returns a list, and
277+
the :meth:`!setdefault` method requires two arguments.
278+
It also supports a "closing" context manager via the :keyword:`with` keyword.
279+
280+
.. versionchanged:: 3.2
281+
Added the :meth:`!get` and :meth:`!setdefault` methods.
254282

255-
A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` supports.
283+
.. versionchanged:: 3.13
284+
Added the :meth:`!clear` method.
256285

257-
:class:`!gdbm` objects behave similar to :term:`mappings <mapping>`,
258-
but :meth:`!items` and :meth:`!values` methods are not supported.
259286
The following methods are also provided:
260287

288+
.. method:: gdbm.close()
289+
290+
Close the GDBM database.
291+
261292
.. method:: gdbm.firstkey()
262293

263294
It's possible to loop over every key in the database using this method and the
@@ -289,16 +320,6 @@ functionality like crash tolerance.
289320
When the database has been opened in fast mode, this method forces any
290321
unwritten data to be written to the disk.
291322

292-
.. method:: gdbm.close()
293-
294-
Close the GDBM database.
295-
296-
.. method:: gdbm.clear()
297-
298-
Remove all items from the GDBM database.
299-
300-
.. versionadded:: 3.13
301-
302323

303324
:mod:`dbm.ndbm` --- New Database Manager
304325
----------------------------------------
@@ -359,22 +380,27 @@ This module can be used with the "classic" NDBM interface or the
359380
:param int mode:
360381
|mode_param_doc|
361382

362-
:class:`!ndbm` objects behave similar to :term:`mappings <mapping>`,
363-
but :meth:`!items` and :meth:`!values` methods are not supported.
364-
The following methods are also provided:
365-
366383
.. versionchanged:: 3.11
367384
Accepts :term:`path-like object` for filename.
368385

369-
.. method:: ndbm.close()
386+
:class:`!ndbm` objects behave similar to mutable :term:`mappings <mapping>`,
387+
but methods :meth:`!items`, :meth:`!values`, :meth:`!pop`, :meth:`!popitem`,
388+
and :meth:`!update` are not supported,
389+
the :meth:`!keys` method returns a list, and
390+
the :meth:`!setdefault` method requires two arguments.
391+
It also supports a "closing" context manager via the :keyword:`with` keyword.
370392

371-
Close the NDBM database.
393+
.. versionchanged:: 3.2
394+
Added the :meth:`!get` and :meth:`!setdefault` methods.
372395

373-
.. method:: ndbm.clear()
396+
.. versionchanged:: 3.13
397+
Added the :meth:`!clear` method.
374398

375-
Remove all items from the NDBM database.
399+
The following method is also provided:
376400

377-
.. versionadded:: 3.13
401+
.. method:: ndbm.close()
402+
403+
Close the NDBM database.
378404

379405

380406
:mod:`dbm.dumb` --- Portable DBM implementation
@@ -412,9 +438,6 @@ The :mod:`!dbm.dumb` module defines the following:
412438
.. function:: open(filename, flag="c", mode=0o666)
413439

414440
Open a :mod:`!dbm.dumb` database.
415-
The returned database object behaves similar to a :term:`mapping`,
416-
in addition to providing :meth:`~dumbdbm.sync` and :meth:`~dumbdbm.close`
417-
methods.
418441

419442
:param filename:
420443
The basename of the database file (without extensions).
@@ -448,15 +471,18 @@ The :mod:`!dbm.dumb` module defines the following:
448471
.. versionchanged:: 3.11
449472
*filename* accepts a :term:`path-like object`.
450473

451-
In addition to the methods provided by the
452-
:class:`collections.abc.MutableMapping` class,
453-
the following methods are provided:
474+
The returned database object behaves similar to a mutable :term:`mapping`,
475+
but the :meth:`!keys` and :meth:`!items` methods return lists, and
476+
the :meth:`!setdefault` method requires two arguments.
477+
It also supports a "closing" context manager via the :keyword:`with` keyword.
454478

455-
.. method:: dumbdbm.sync()
456-
457-
Synchronize the on-disk directory and data files. This method is called
458-
by the :meth:`shelve.Shelf.sync` method.
479+
The following methods are also provided:
459480

460481
.. method:: dumbdbm.close()
461482

462483
Close the database.
484+
485+
.. method:: dumbdbm.sync()
486+
487+
Synchronize the on-disk directory and data files. This method is called
488+
by the :meth:`shelve.Shelf.sync` method.

pr-preview/pr-1133/_sources/library/ssl.rst.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,8 +1840,9 @@ to speed up repeated connections from the same clients.
18401840
.. attribute:: SSLContext.sslsocket_class
18411841

18421842
The return type of :meth:`SSLContext.wrap_socket`, defaults to
1843-
:class:`SSLSocket`. The attribute can be overridden on instance of class
1844-
in order to return a custom subclass of :class:`SSLSocket`.
1843+
:class:`SSLSocket`. The attribute can be assigned to on instances of
1844+
:class:`SSLContext` in order to return a custom subclass of
1845+
:class:`SSLSocket`.
18451846

18461847
.. versionadded:: 3.7
18471848

pr-preview/pr-1133/_sources/whatsnew/3.13.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ dbm
843843
(Contributed by Raymond Hettinger and Erlend E. Aasland in :gh:`100414`.)
844844

845845
* Allow removing all items from the database through
846-
the new :meth:`.gdbm.clear` and :meth:`.ndbm.clear` methods.
846+
the new :meth:`!clear` methods of the GDBM and NDBM database objects.
847847
(Contributed by Donghee Na in :gh:`107122`.)
848848

849849

pr-preview/pr-1133/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<a href="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br>
322322
<br>
323-
最後更新於 8月 19, 2025 (00:21 UTC)。
323+
最後更新於 8月 20, 2025 (00:20 UTC)。
324324

325325
<a href="/bugs.html">Found a bug</a>?
326326

pr-preview/pr-1133/bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<a href="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br>
361361
<br>
362-
最後更新於 8月 19, 2025 (00:21 UTC)。
362+
最後更新於 8月 20, 2025 (00:20 UTC)。
363363

364364
<a href="/bugs.html">Found a bug</a>?
365365

pr-preview/pr-1133/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br>
331331
<br>
332-
最後更新於 8月 19, 2025 (00:21 UTC)。
332+
最後更新於 8月 20, 2025 (00:20 UTC)。
333333

334334
<a href="/bugs.html">Found a bug</a>?
335335

pr-preview/pr-1133/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ <h3>瀏覽</h3>
346346
<a href="https://www.python.org/psf/donations/">Please donate.</a>
347347
<br>
348348
<br>
349-
最後更新於 8月 19, 2025 (00:21 UTC)。
349+
最後更新於 8月 20, 2025 (00:20 UTC)。
350350

351351
<a href="/bugs.html">Found a bug</a>?
352352

pr-preview/pr-1133/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>瀏覽</h3>
376376
<a href="https://www.python.org/psf/donations/">Please donate.</a>
377377
<br>
378378
<br>
379-
最後更新於 8月 19, 2025 (00:21 UTC)。
379+
最後更新於 8月 20, 2025 (00:20 UTC)。
380380

381381
<a href="/bugs.html">Found a bug</a>?
382382

pr-preview/pr-1133/c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ <h3>瀏覽</h3>
931931
<a href="https://www.python.org/psf/donations/">Please donate.</a>
932932
<br>
933933
<br>
934-
最後更新於 8月 19, 2025 (00:21 UTC)。
934+
最後更新於 8月 20, 2025 (00:20 UTC)。
935935

936936
<a href="/bugs.html">Found a bug</a>?
937937

0 commit comments

Comments
 (0)