Skip to content

Commit c7e428f

Browse files
authored
Merge branch 'main' into idle-save
2 parents 4496374 + ff7bb56 commit c7e428f

File tree

77 files changed

+1939
-1167
lines changed

Some content is hidden

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

77 files changed

+1939
-1167
lines changed

Doc/c-api/bytes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Create, Finish, Discard
260260
writer size to *size*. The caller is responsible to write *size*
261261
bytes using :c:func:`PyBytesWriter_GetData`.
262262
263-
On error, set an exception and return NULL.
263+
On error, set an exception and return ``NULL``.
264264
265265
*size* must be positive or zero.
266266

Doc/c-api/function.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ There are a few functions specific to Python functions.
175175
176176
.. versionadded:: 3.12
177177
178+
- ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``
179+
180+
.. versionadded:: 3.15
178181
179182
.. c:type:: int (*PyFunction_WatchCallback)(PyFunction_WatchEvent event, PyFunctionObject *func, PyObject *new_value)
180183

Doc/c-api/tuple.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ Tuple Objects
3737
or ``NULL`` with an exception set on failure.
3838
3939
40+
.. c:function:: PyObject* PyTuple_FromArray(PyObject *const *array, Py_ssize_t size)
41+
42+
Create a tuple of *size* items and copy references from *array* to the new
43+
tuple.
44+
45+
*array* can be NULL if *size* is ``0``.
46+
47+
On success, return a new reference.
48+
On error, set an exception and return ``NULL``.
49+
50+
.. versionadded:: next
51+
52+
4053
.. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)
4154
4255
Return a new tuple object of size *n*,

Doc/library/crypt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ being deprecated in Python 3.11. The removal was decided in :pep:`594`.
1313

1414
Applications can use the :mod:`hashlib` module from the standard library.
1515
Other possible replacements are third-party libraries from PyPI:
16-
:pypi:`legacycrypt`, :pypi:`bcrypt`, :pypi:`argon2-cffi`, or :pypi:`passlib`.
16+
:pypi:`legacycrypt`, :pypi:`bcrypt`, or :pypi:`argon2-cffi`.
1717
These are not supported or maintained by the Python core team.
1818

1919
The last version of Python that provided the :mod:`!crypt` module was

Doc/library/os.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4592,6 +4592,8 @@ written in Python, such as a mail server's external command delivery program.
45924592
master end of the pseudo-terminal. For a more portable approach, use the
45934593
:mod:`pty` module. If an error occurs :exc:`OSError` is raised.
45944594

4595+
The returned file descriptor *fd* is :ref:`non-inheritable <fd_inheritance>`.
4596+
45954597
.. audit-event:: os.forkpty "" os.forkpty
45964598

45974599
.. warning::
@@ -4608,6 +4610,9 @@ written in Python, such as a mail server's external command delivery program.
46084610
threads, this now raises a :exc:`DeprecationWarning`. See the
46094611
longer explanation on :func:`os.fork`.
46104612

4613+
.. versionchanged:: next
4614+
The returned file descriptor is now made non-inheritable.
4615+
46114616
.. availability:: Unix, not WASI, not Android, not iOS.
46124617

46134618

Doc/library/pty.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ The :mod:`pty` module defines the following functions:
3333
file descriptor connected to the child's controlling terminal (and also to the
3434
child's standard input and output).
3535

36+
The returned file descriptor *fd* is :ref:`non-inheritable <fd_inheritance>`.
37+
3638
.. warning:: On macOS the use of this function is unsafe when mixed with using
3739
higher-level system APIs, and that includes using :mod:`urllib.request`.
3840

41+
.. versionchanged:: next
42+
The returned file descriptor is now made non-inheritable.
43+
3944

4045
.. function:: openpty()
4146

Doc/library/signal.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,26 @@ The variables defined in the :mod:`signal` module are:
205205

206206
.. availability:: Unix.
207207

208+
.. data:: SIGPROF
209+
210+
Profiling timer expired.
211+
212+
.. availability:: Unix.
213+
214+
.. data:: SIGQUIT
215+
216+
Terminal quit signal.
217+
218+
.. availability:: Unix.
219+
208220
.. data:: SIGSEGV
209221

210222
Segmentation fault: invalid memory reference.
211223

224+
.. data:: SIGSTOP
225+
226+
Stop executing (cannot be caught or ignored).
227+
212228
.. data:: SIGSTKFLT
213229

214230
Stack fault on coprocessor. The Linux kernel does not raise this signal: it
@@ -237,6 +253,12 @@ The variables defined in the :mod:`signal` module are:
237253

238254
.. availability:: Unix.
239255

256+
.. data:: SIGVTALRM
257+
258+
Virtual timer expired.
259+
260+
.. availability:: Unix.
261+
240262
.. data:: SIGWINCH
241263

242264
Window resize signal.

Doc/library/sysconfig.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ Other functions
382382

383383
Examples of returned values:
384384

385+
- linux-x86_64
386+
- linux-aarch64
387+
- solaris-2.6-sun4u
385388

386389
Windows:
387390

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ without the dedicated syntax, as documented below.
22692269

22702270
.. attribute:: __module__
22712271

2272-
The module in which the type alias was defined::
2272+
The name of the module in which the type alias was defined::
22732273

22742274
>>> type Alias = int
22752275
>>> Alias.__module__
@@ -2449,7 +2449,7 @@ types.
24492449

24502450
.. attribute:: __module__
24512451

2452-
The module in which the new type is defined.
2452+
The name of the module in which the new type is defined.
24532453

24542454
.. attribute:: __name__
24552455

Doc/library/zlib.rst

Lines changed: 133 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ earlier than 1.1.3; 1.1.3 has a `security vulnerability <https://zlib.net/zlib_f
1616

1717
zlib's functions have many options and often need to be used in a particular
1818
order. This documentation doesn't attempt to cover all of the permutations;
19-
consult the zlib manual at http://www.zlib.net/manual.html for authoritative
19+
consult the `zlib manual <https://www.zlib.net/manual.html>`_ for authoritative
2020
information.
2121

2222
For reading and writing ``.gz`` files see the :mod:`gzip` module.
@@ -340,6 +340,136 @@ Decompression objects support the following methods and attributes:
340340
objects.
341341

342342

343+
The following constants are available to configure compression and decompression
344+
behavior:
345+
346+
.. data:: DEFLATED
347+
348+
The deflate compression method.
349+
350+
351+
.. data:: MAX_WBITS
352+
353+
The maximum window size, expressed as a power of 2.
354+
For example, if :const:`!MAX_WBITS` is ``15`` it results in a window size
355+
of ``32 KiB``.
356+
357+
358+
.. data:: DEF_MEM_LEVEL
359+
360+
The default memory level for compression objects.
361+
362+
363+
.. data:: DEF_BUF_SIZE
364+
365+
The default buffer size for decompression operations.
366+
367+
368+
.. data:: Z_NO_COMPRESSION
369+
370+
Compression level ``0``.
371+
372+
.. versionadded:: 3.6
373+
374+
375+
.. data:: Z_BEST_SPEED
376+
377+
Compression level ``1``.
378+
379+
380+
.. data:: Z_BEST_COMPRESSION
381+
382+
Compression level ``9``.
383+
384+
385+
.. data:: Z_DEFAULT_COMPRESSION
386+
387+
Default compression level (``-1``).
388+
389+
390+
.. data:: Z_DEFAULT_STRATEGY
391+
392+
Default compression strategy, for normal data.
393+
394+
395+
.. data:: Z_FILTERED
396+
397+
Compression strategy for data produced by a filter (or predictor).
398+
399+
400+
.. data:: Z_HUFFMAN_ONLY
401+
402+
Compression strategy that forces Huffman coding only.
403+
404+
405+
.. data:: Z_RLE
406+
407+
Compression strategy that limits match distances to one (run-length encoding).
408+
409+
This constant is only available if Python was compiled with zlib
410+
1.2.0.1 or greater.
411+
412+
.. versionadded:: 3.6
413+
414+
415+
.. data:: Z_FIXED
416+
417+
Compression strategy that prevents the use of dynamic Huffman codes.
418+
419+
This constant is only available if Python was compiled with zlib
420+
1.2.2.2 or greater.
421+
422+
.. versionadded:: 3.6
423+
424+
425+
.. data:: Z_NO_FLUSH
426+
427+
Flush mode ``0``. No special flushing behavior.
428+
429+
.. versionadded:: 3.6
430+
431+
432+
.. data:: Z_PARTIAL_FLUSH
433+
434+
Flush mode ``1``. Flush as much output as possible.
435+
436+
437+
.. data:: Z_SYNC_FLUSH
438+
439+
Flush mode ``2``. All output is flushed and the output is aligned to a byte boundary.
440+
441+
442+
.. data:: Z_FULL_FLUSH
443+
444+
Flush mode ``3``. All output is flushed and the compression state is reset.
445+
446+
447+
.. data:: Z_FINISH
448+
449+
Flush mode ``4``. All pending input is processed, no more input is expected.
450+
451+
452+
.. data:: Z_BLOCK
453+
454+
Flush mode ``5``. A deflate block is completed and emitted.
455+
456+
This constant is only available if Python was compiled with zlib
457+
1.2.2.2 or greater.
458+
459+
.. versionadded:: 3.6
460+
461+
462+
.. data:: Z_TREES
463+
464+
Flush mode ``6``, for inflate operations. Instructs inflate to return when
465+
it gets to the next deflate block boundary.
466+
467+
This constant is only available if Python was compiled with zlib
468+
1.2.3.4 or greater.
469+
470+
.. versionadded:: 3.6
471+
472+
343473
Information about the version of the zlib library in use is available through
344474
the following constants:
345475

@@ -375,10 +505,10 @@ the following constants:
375505
Module :mod:`gzip`
376506
Reading and writing :program:`gzip`\ -format files.
377507

378-
http://www.zlib.net
508+
https://www.zlib.net
379509
The zlib library home page.
380510

381-
http://www.zlib.net/manual.html
511+
https://www.zlib.net/manual.html
382512
The zlib manual explains the semantics and usage of the library's many
383513
functions.
384514

0 commit comments

Comments
 (0)