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

Skip to content

Commit 381205f

Browse files
Merge branch 'main' into nitpick_ignore
2 parents 60cfe62 + 26e08df commit 381205f

47 files changed

Lines changed: 243 additions & 138 deletions

Some content is hidden

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

Doc/library/curses.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,8 @@ The module :mod:`curses` defines the following functions:
641641

642642
.. function:: update_lines_cols()
643643

644-
Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual screen resize.
644+
Update the :const:`LINES` and :const:`COLS` module variables.
645+
Useful for detecting manual screen resize.
645646

646647
.. versionadded:: 3.5
647648

@@ -1342,10 +1343,27 @@ The :mod:`curses` module defines the following data members:
13421343
.. data:: COLORS
13431344

13441345
The maximum number of colors the terminal can support.
1346+
It is defined only after the call to :func:`start_color`.
13451347

13461348
.. data:: COLOR_PAIRS
13471349

13481350
The maximum number of color pairs the terminal can support.
1351+
It is defined only after the call to :func:`start_color`.
1352+
1353+
.. data:: COLS
1354+
1355+
The width of the screen, i.e., the number of columns.
1356+
It is defined only after the call to :func:`initscr`.
1357+
Updated by :func:`update_lines_cols`, :func:`resizeterm` and
1358+
:func:`resize_term`.
1359+
1360+
.. data:: LINES
1361+
1362+
The height of the screen, i.e., the number of lines.
1363+
It is defined only after the call to :func:`initscr`.
1364+
Updated by :func:`update_lines_cols`, :func:`resizeterm` and
1365+
:func:`resize_term`.
1366+
13491367

13501368
Some constants are available to specify character cell attributes.
13511369
The exact constants available are system dependent.

Doc/library/re.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ The special characters are:
501501
in the ASCII range (``b'\x00'``-``b'\x7f'``).
502502

503503

504+
.. _re-special-sequences:
505+
504506
The special sequences consist of ``'\'`` and a character from the list below.
505507
If the ordinary character is not an ASCII digit or an ASCII letter, then the
506508
resulting RE will match the second character. For example, ``\$`` matches the
@@ -779,6 +781,17 @@ Flags
779781
Corresponds to the inline flag ``(?s)``.
780782

781783

784+
.. data:: U
785+
UNICODE
786+
787+
In Python 2, this flag made :ref:`special sequences <re-special-sequences>`
788+
include Unicode characters in matches. Since Python 3, Unicode characters
789+
are matched by default.
790+
791+
See :const:`A` for restricting matching on ASCII characters instead.
792+
793+
This flag is only kept for backward compatibility.
794+
782795
.. data:: X
783796
VERBOSE
784797

@@ -1520,14 +1533,14 @@ Simulating scanf()
15201533

15211534
.. index:: single: scanf()
15221535

1523-
Python does not currently have an equivalent to :c:func:`scanf`. Regular
1536+
Python does not currently have an equivalent to :c:func:`!scanf`. Regular
15241537
expressions are generally more powerful, though also more verbose, than
1525-
:c:func:`scanf` format strings. The table below offers some more-or-less
1526-
equivalent mappings between :c:func:`scanf` format tokens and regular
1538+
:c:func:`!scanf` format strings. The table below offers some more-or-less
1539+
equivalent mappings between :c:func:`!scanf` format tokens and regular
15271540
expressions.
15281541

15291542
+--------------------------------+---------------------------------------------+
1530-
| :c:func:`scanf` Token | Regular Expression |
1543+
| :c:func:`!scanf` Token | Regular Expression |
15311544
+================================+=============================================+
15321545
| ``%c`` | ``.`` |
15331546
+--------------------------------+---------------------------------------------+
@@ -1552,7 +1565,7 @@ To extract the filename and numbers from a string like ::
15521565

15531566
/usr/sbin/sendmail - 0 errors, 4 warnings
15541567

1555-
you would use a :c:func:`scanf` format like ::
1568+
you would use a :c:func:`!scanf` format like ::
15561569

15571570
%s - %d errors, %d warnings
15581571

Doc/library/shutil.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,12 @@ Directory and files operations
399399
total, used and free space, in bytes. *path* may be a file or a
400400
directory.
401401

402+
.. note::
403+
404+
On Unix filesystems, *path* must point to a path within a **mounted**
405+
filesystem partition. On those platforms, CPython doesn't attempt to
406+
retrieve disk usage information from non-mounted filesystems.
407+
402408
.. versionadded:: 3.3
403409

404410
.. versionchanged:: 3.8

Doc/library/ssl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ disabled by default.
25922592
>>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3
25932593

25942594

2595-
The SSL context created above will only allow TLSv1.2 and later (if
2595+
The SSL context created above will only allow TLSv1.3 and later (if
25962596
supported by your system) connections to a server. :const:`PROTOCOL_TLS_CLIENT`
25972597
implies certificate validation and hostname checks by default. You have to
25982598
load certificates into the context.

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ Doc/library/pyclbr.rst
169169
Doc/library/pydoc.rst
170170
Doc/library/pyexpat.rst
171171
Doc/library/random.rst
172-
Doc/library/re.rst
173172
Doc/library/readline.rst
174173
Doc/library/reprlib.rst
175174
Doc/library/resource.rst

Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
What's New In Python 3.12
44
****************************
55

6-
:Release: |release|
7-
:Date: |today|
6+
:Editor: TBD
87

98
.. Rules for maintenance:
109

Doc/whatsnew/3.13.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
What's New In Python 3.13
44
****************************
55

6-
:Release: |release|
7-
:Date: |today|
6+
:Editor: TBD
87

98
.. Rules for maintenance:
109

Doc/whatsnew/3.5.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,8 @@ not just sequences. (Contributed by Serhiy Storchaka in :issue:`23171`.)
10451045
curses
10461046
------
10471047

1048-
The new :func:`~curses.update_lines_cols` function updates the :envvar:`LINES`
1049-
and :envvar:`COLS` environment variables. This is useful for detecting
1048+
The new :func:`~curses.update_lines_cols` function updates the :data:`LINES`
1049+
and :data:`COLS` module variables. This is useful for detecting
10501050
manual screen resizing. (Contributed by Arnon Yaari in :issue:`4254`.)
10511051

10521052

Include/cpython/genobject.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ PyAPI_DATA(PyTypeObject) PyGen_Type;
4141
PyAPI_FUNC(PyObject *) PyGen_New(PyFrameObject *);
4242
PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *,
4343
PyObject *name, PyObject *qualname);
44-
PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *);
45-
PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
46-
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
4744
PyAPI_FUNC(PyCodeObject *) PyGen_GetCode(PyGenObject *gen);
4845

4946

@@ -54,7 +51,6 @@ typedef struct {
5451
} PyCoroObject;
5552

5653
PyAPI_DATA(PyTypeObject) PyCoro_Type;
57-
PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
5854

5955
#define PyCoro_CheckExact(op) Py_IS_TYPE((op), &PyCoro_Type)
6056
PyAPI_FUNC(PyObject *) PyCoro_New(PyFrameObject *,
@@ -69,8 +65,6 @@ typedef struct {
6965

7066
PyAPI_DATA(PyTypeObject) PyAsyncGen_Type;
7167
PyAPI_DATA(PyTypeObject) _PyAsyncGenASend_Type;
72-
PyAPI_DATA(PyTypeObject) _PyAsyncGenWrappedValue_Type;
73-
PyAPI_DATA(PyTypeObject) _PyAsyncGenAThrow_Type;
7468

7569
PyAPI_FUNC(PyObject *) PyAsyncGen_New(PyFrameObject *,
7670
PyObject *name, PyObject *qualname);

Include/cpython/object.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,6 @@ PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *);
377377
#endif
378378

379379

380-
PyAPI_DATA(PyTypeObject) _PyNone_Type;
381-
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
382-
383-
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
384-
* Defined in object.c.
385-
*/
386-
PyAPI_DATA(int) _Py_SwappedOp[];
387-
388380
PyAPI_FUNC(void)
389381
_PyDebugAllocatorStats(FILE *out, const char *block_name, int num_blocks,
390382
size_t sizeof_block);

0 commit comments

Comments
 (0)