Skip to content

Commit 8385bc5

Browse files
authored
Merge branch 'main' into gh-138514-fix-getpass-echo-char
2 parents a6aed93 + 6e78a53 commit 8385bc5

23 files changed

+1322
-520
lines changed

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
7272
include:
7373
- target: i686-pc-windows-msvc/msvc
7474
architecture: Win32
75-
runner: windows-latest
75+
runner: windows-2022
7676
- target: x86_64-pc-windows-msvc/msvc
7777
architecture: x64
78-
runner: windows-latest
78+
runner: windows-2022
7979
- target: aarch64-pc-windows-msvc/msvc
8080
architecture: ARM64
8181
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-latest' }}
20+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
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-latest' }}
24+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
2525
timeout-minutes: 60
2626
env:
2727
ARCH: ${{ inputs.arch }}

.github/workflows/tail-call.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ jobs:
4949
include:
5050
# - target: i686-pc-windows-msvc/msvc
5151
# architecture: Win32
52-
# runner: windows-latest
52+
# runner: windows-2022
5353
- target: x86_64-pc-windows-msvc/msvc
5454
architecture: x64
55-
runner: windows-latest
55+
runner: windows-2022
5656
# - target: aarch64-pc-windows-msvc/msvc
5757
# architecture: ARM64
58-
# runner: windows-latest
58+
# runner: windows-2022
5959
- target: x86_64-apple-darwin/clang
6060
architecture: x86_64
6161
runner: macos-13

Grammar/python.gram

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,14 @@ invalid_assert_stmt:
13151315
a, b,
13161316
"cannot assign to %s here. Maybe you meant '==' instead of '='?",
13171317
_PyPegen_get_expr_name(a)) }
1318+
| 'assert' a=expression ':=' b=expression {
1319+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1320+
a, b,
1321+
"cannot use named expression without parentheses here") }
1322+
| 'assert' expression ',' a=expression ':=' b=expression {
1323+
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
1324+
a, b,
1325+
"cannot use named expression without parentheses here") }
13181326
invalid_block:
13191327
| NEWLINE !INDENT { RAISE_INDENTATION_ERROR("expected an indented block") }
13201328
invalid_comprehension:

Include/internal/pycore_magic_number.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,13 @@ Known values:
279279
Python 3.14b1 3624 (Don't optimize LOAD_FAST when local is killed by DELETE_FAST)
280280
Python 3.14b3 3625 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST)
281281
Python 3.14rc2 3626 (Fix missing exception handlers in logical expression)
282+
Python 3.14rc3 3627 (Fix miscompilation of some module-level annotations)
282283
Python 3.15a0 3650 (Initial version)
283284
Python 3.15a1 3651 (Simplify LOAD_CONST)
284285
Python 3.15a1 3652 (Virtual iterators)
285286
Python 3.15a1 3653 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST)
286287
Python 3.15a1 3654 (Fix missing exception handlers in logical expression)
288+
Python 3.15a1 3655 (Fix miscompilation of some module-level annotations)
287289
288290
289291
Python 3.16 will start with 3700
@@ -297,7 +299,7 @@ PC/launcher.c must also be updated.
297299
298300
*/
299301

300-
#define PYC_MAGIC_NUMBER 3654
302+
#define PYC_MAGIC_NUMBER 3655
301303
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
302304
(little-endian) and then appending b'\r\n'. */
303305
#define PYC_MAGIC_NUMBER_TOKEN \

Include/pymath.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,24 @@
5757

5858
/* Py_NAN: Value that evaluates to a quiet Not-a-Number (NaN). The sign is
5959
* undefined and normally not relevant, but e.g. fixed for float("nan").
60+
*
61+
* Note: On Solaris, NAN is a function address, hence arithmetic is impossible.
62+
* For that reason, we instead use the built-in call if available or fallback
63+
* to a generic NaN computed from strtod() as a last resort.
64+
*
65+
* See https://github.com/python/cpython/issues/136006 for details.
6066
*/
6167
#if !defined(Py_NAN)
62-
# define Py_NAN ((double)NAN)
68+
# if defined(__sun)
69+
# if _Py__has_builtin(__builtin_nanf)
70+
# define Py_NAN ((double)__builtin_nanf(""))
71+
# else
72+
# include <stdlib.h>
73+
# define Py_NAN (strtod("NAN", NULL))
74+
# endif
75+
# else
76+
# define Py_NAN ((double)NAN)
77+
# endif
6378
#endif
6479

6580
#endif /* Py_PYMATH_H */

0 commit comments

Comments
 (0)