Skip to content

Commit 3901a4c

Browse files
committed
Merge branch 'main' into dataclass-lazy-inspect
2 parents 6bc6199 + e66f4a5 commit 3901a4c

File tree

21 files changed

+104
-63
lines changed

21 files changed

+104
-63
lines changed

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ jobs:
7474
include:
7575
- target: i686-pc-windows-msvc/msvc
7676
architecture: Win32
77-
runner: windows-2022
77+
runner: windows-2025
7878
- target: x86_64-pc-windows-msvc/msvc
7979
architecture: x64
80-
runner: windows-2022
80+
runner: windows-2025
8181
- target: aarch64-pc-windows-msvc/msvc
8282
architecture: ARM64
8383
runner: windows-11-arm

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
jobs:
1818
build:
1919
name: installer for ${{ inputs.arch }}
20-
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
20+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
2121
timeout-minutes: 60
2222
env:
2323
ARCH: ${{ inputs.arch }}

.github/workflows/reusable-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
jobs:
2222
build:
2323
name: Build and test (${{ inputs.arch }})
24-
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
24+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
2525
timeout-minutes: 60
2626
env:
2727
ARCH: ${{ inputs.arch }}

Doc/c-api/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ System includes
123123
* ``<limits.h>``
124124
* ``<math.h>``
125125
* ``<stdarg.h>``
126+
* ``<string.h>``
126127
* ``<wchar.h>``
127128
* ``<sys/types.h>`` (if present)
128129

@@ -138,7 +139,6 @@ System includes
138139
* ``<errno.h>``
139140
* ``<stdio.h>``
140141
* ``<stdlib.h>``
141-
* ``<string.h>``
142142

143143
.. note::
144144

Doc/library/datetime.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,6 +2689,12 @@ For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods,
26892689
the default value is ``1900-01-01T00:00:00.000``: any components not specified
26902690
in the format string will be pulled from the default value.
26912691

2692+
.. note::
2693+
Format strings without separators can be ambiguous for parsing. For
2694+
example, with ``%Y%m%d``, the string ``2026111`` may be parsed either as
2695+
``2026-11-01`` or as ``2026-01-11``.
2696+
Use separators to ensure the input is parsed as intended.
2697+
26922698
.. note::
26932699
When used to parse partial dates lacking a year, :meth:`.datetime.strptime`
26942700
and :meth:`.date.strptime` will raise when encountering February 29 because

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ expression support in the :mod:`re` module).
21832183
Return ``True`` if all characters in the string are alphanumeric and there is at
21842184
least one character, ``False`` otherwise. A character ``c`` is alphanumeric if one
21852185
of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``,
2186-
``c.isdigit()``, or ``c.isnumeric()``. For example::
2186+
``c.isdigit()``, or ``c.isnumeric()``. For example:
21872187

21882188
.. doctest::
21892189

Include/Python.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
#include <limits.h> // INT_MAX
2323
#include <math.h> // HUGE_VAL
2424
#include <stdarg.h> // va_list
25+
#include <string.h> // memcpy()
2526
#include <wchar.h> // wchar_t
2627
#ifdef HAVE_SYS_TYPES_H
2728
# include <sys/types.h> // ssize_t
2829
#endif
2930

30-
// <errno.h>, <stdio.h>, <stdlib.h> and <string.h> headers are no longer used
31+
// <errno.h>, <stdio.h> and <stdlib.h> headers are no longer used
3132
// by Python, but kept for the backward compatibility of existing third party C
3233
// extensions. They are not included by limited C API version 3.11 and newer.
3334
//
@@ -37,7 +38,6 @@
3738
# include <errno.h> // errno
3839
# include <stdio.h> // FILE*
3940
# include <stdlib.h> // getenv()
40-
# include <string.h> // memcpy()
4141
#endif
4242
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030d0000
4343
# include <ctype.h> // tolower()

Include/import.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ PyAPI_FUNC(int) PyImport_AppendInittab(
9191
typedef enum {
9292
PyImport_LAZY_NORMAL,
9393
PyImport_LAZY_ALL,
94-
PyImport_LAZY_NONE,
94+
PyImport_LAZY_NONE
9595
} PyImport_LazyImportsMode;
9696

9797
#ifndef Py_LIMITED_API

Include/pyport.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,11 @@ extern "C" {
567567
//
568568
// Example: _Py_TYPEOF(x) x_copy = (x);
569569
//
570-
// The macro is only defined if GCC or clang compiler is used.
571-
#if defined(__GNUC__) || defined(__clang__)
570+
// On C23, use typeof(). Otherwise, the macro is only defined
571+
// if GCC or clang compiler is used.
572+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
573+
# define _Py_TYPEOF(expr) typeof(expr)
574+
#elif defined(__GNUC__) || defined(__clang__)
572575
# define _Py_TYPEOF(expr) __typeof__(expr)
573576
#endif
574577

Lib/idlelib/idle_test/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __eq__(self, other):
4444
"Or did you forget to import 'abc'?\n"),
4545
('int.reel', AttributeError,
4646
"type object 'int' has no attribute 'reel'. "
47-
"Did you mean: 'real'?\n"),
47+
"Did you mean '.real' instead of '.reel'?\n"),
4848
)
4949

5050
@force_not_colorized

0 commit comments

Comments
 (0)