Skip to content

Commit af9d886

Browse files
committed
Merge 'origin/main' into gh-131253-pystats-ft
2 parents 5034375 + b3c713a commit af9d886

Some content is hidden

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

49 files changed

+1000
-272
lines changed

Doc/c-api/arg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ There are three ways strings and buffers can be converted to C:
160160
``w*`` (read-write :term:`bytes-like object`) [Py_buffer]
161161
This format accepts any object which implements the read-write buffer
162162
interface. It fills a :c:type:`Py_buffer` structure provided by the caller.
163-
The buffer may contain embedded null bytes. The caller have to call
163+
The buffer may contain embedded null bytes. The caller has to call
164164
:c:func:`PyBuffer_Release` when it is done with the buffer.
165165

166166
``es`` (:class:`str`) [const char \*encoding, char \*\*buffer]

Doc/c-api/module.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ Module Objects
102102
Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
103103
created, or ``NULL`` if the module wasn't created from a definition.
104104
105+
On error, return ``NULL`` with an exception set.
106+
Use :c:func:`PyErr_Occurred` to tell this case apart from a mising
107+
:c:type:`!PyModuleDef`.
108+
105109
106110
.. c:function:: PyObject* PyModule_GetFilenameObject(PyObject *module)
107111

Doc/library/ast.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ Literals
363363
function call).
364364
This has the same meaning as ``FormattedValue.value``.
365365
* ``str`` is a constant containing the text of the interpolation expression.
366+
367+
If ``str`` is set to ``None``, then ``value`` is used to generate code
368+
when calling :func:`ast.unparse`. This no longer guarantees that the
369+
generated code is identical to the original and is intended for code
370+
generation.
366371
* ``conversion`` is an integer:
367372

368373
* -1: no conversion

Doc/library/os.rst

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,11 +3413,6 @@ features:
34133413

34143414
:class:`!statx_result` has the following attributes:
34153415

3416-
.. attribute:: stx_mask
3417-
3418-
Bitmask of :const:`STATX_* <STATX_TYPE>` constants specifying the
3419-
information retrieved, which may differ from what was requested.
3420-
34213416
.. attribute:: stx_atime
34223417

34233418
Time of most recent access expressed in seconds.
@@ -3442,35 +3437,35 @@ features:
34423437
.. availability:: Linux >= 4.11 with glibc >= 2.28 and build-time kernel
34433438
userspace API headers >= 6.11.
34443439

3445-
.. attribute:: stx_atomic_write_unit_min
3440+
.. attribute:: stx_atomic_write_unit_max
34463441

3447-
Minimum size for direct I/O with torn-write protection.
3442+
Maximum size for direct I/O with torn-write protection.
34483443

34493444
Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from
34503445
:attr:`~statx_result.stx_mask`.
34513446

34523447
.. availability:: Linux >= 4.11 with glibc >= 2.28 and build-time kernel
34533448
userspace API headers >= 6.11.
34543449

3455-
.. attribute:: stx_atomic_write_unit_max
3450+
.. attribute:: stx_atomic_write_unit_max_opt
34563451

3457-
Maximum size for direct I/O with torn-write protection.
3452+
Maximum optimized size for direct I/O with torn-write protection.
34583453

34593454
Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from
34603455
:attr:`~statx_result.stx_mask`.
34613456

34623457
.. availability:: Linux >= 4.11 with glibc >= 2.28 and build-time kernel
3463-
userspace API headers >= 6.11.
3458+
userspace API headers >= 6.16.
34643459

3465-
.. attribute:: stx_atomic_write_unit_max_opt
3460+
.. attribute:: stx_atomic_write_unit_min
34663461

3467-
Maximum optimized size for direct I/O with torn-write protection.
3462+
Minimum size for direct I/O with torn-write protection.
34683463

34693464
Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from
34703465
:attr:`~statx_result.stx_mask`.
34713466

34723467
.. availability:: Linux >= 4.11 with glibc >= 2.28 and build-time kernel
3473-
userspace API headers >= 6.16.
3468+
userspace API headers >= 6.11.
34743469

34753470
.. attribute:: stx_attributes
34763471

@@ -3536,19 +3531,19 @@ features:
35363531

35373532
Minor number of the device on which this file resides.
35383533

3539-
.. attribute:: stx_dio_offset_align
3534+
.. attribute:: stx_dio_mem_align
35403535

3541-
Direct I/O file offset alignment requirement.
3536+
Direct I/O memory buffer alignment requirement.
35423537

35433538
Equal to ``None`` if :data:`STATX_DIOALIGN` is missing from
35443539
:attr:`~statx_result.stx_mask`.
35453540

35463541
.. availability:: Linux >= 4.11 with glibc >= 2.28 and build-time kernel
35473542
userspace API headers >= 6.1.
35483543

3549-
.. attribute:: stx_dio_mem_align
3544+
.. attribute:: stx_dio_offset_align
35503545

3551-
Direct I/O memory buffer alignment requirement.
3546+
Direct I/O file offset alignment requirement.
35523547

35533548
Equal to ``None`` if :data:`STATX_DIOALIGN` is missing from
35543549
:attr:`~statx_result.stx_mask`.
@@ -3580,6 +3575,11 @@ features:
35803575
Equal to ``None`` if :data:`STATX_INO` is missing from
35813576
:attr:`~statx_result.stx_mask`.
35823577

3578+
.. attribute:: stx_mask
3579+
3580+
Bitmask of :const:`STATX_* <STATX_TYPE>` constants specifying the
3581+
information retrieved, which may differ from what was requested.
3582+
35833583
.. attribute:: stx_mnt_id
35843584

35853585
Mount identifier.
@@ -3594,6 +3594,9 @@ features:
35943594

35953595
File mode: file type and file mode bits (permissions).
35963596

3597+
Equal to ``None`` if :data:`STATX_TYPE | STATX_MODE <STATX_TYPE>`
3598+
is missing from :attr:`~statx_result.stx_mask`.
3599+
35973600
.. attribute:: stx_mtime
35983601

35993602
Time of most recent content modification expressed in seconds.

Doc/library/xmlrpc.client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Convenience Functions
524524

525525
.. function:: dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=False)
526526

527-
Convert *params* into an XML-RPC request. or into a response if *methodresponse*
527+
Convert *params* into an XML-RPC request, or into a response if *methodresponse*
528528
is true. *params* can be either a tuple of arguments or an instance of the
529529
:exc:`Fault` exception class. If *methodresponse* is true, only a single value
530530
can be returned, meaning that *params* must be of length 1. *encoding*, if

Doc/whatsnew/3.15.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ sqlite3
498498
details.
499499
(Contributed by Stan Ulbrych and Łukasz Langa in :gh:`133461`.)
500500

501+
* Table, index, trigger, view, column, function, and schema completion on <tab>.
502+
(Contributed by Long Tan in :gh:`136101`.)
503+
501504

502505
ssl
503506
---
@@ -652,11 +655,11 @@ zlib
652655
Optimizations
653656
=============
654657

655-
module_name
656-
-----------
657-
658-
* TODO
658+
csv
659+
---
659660

661+
* :meth:`csv.Sniffer.sniff` delimiter detection is now up to 1.6x faster.
662+
(Contributed by Maurycy Pawłowski-Wieroński in :gh:`137628`.)
660663

661664

662665
Removed

Grammar/python.gram

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,10 @@ invalid_match_stmt:
14771477
| "match" subject_expr NEWLINE { CHECK_VERSION(void*, 10, "Pattern matching is", RAISE_SYNTAX_ERROR("expected ':'") ) }
14781478
| a="match" subject=subject_expr ':' NEWLINE !INDENT {
14791479
RAISE_INDENTATION_ERROR("expected an indented block after 'match' statement on line %d", a->lineno) }
1480+
| a="case" patterns guard? b=':' block {
1481+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1482+
a, b,
1483+
"case statement must be inside match statement") }
14801484
invalid_case_block:
14811485
| "case" patterns guard? NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") }
14821486
| a="case" patterns guard? ':' NEWLINE !INDENT {

0 commit comments

Comments
 (0)