GeezerVison is showing github.com — Merge branch 'main' into gh-129515-ifexp-syntax-error · sergey-miryanov/cpython@63b4400
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/build.yml +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -621,6 +621,7 @@ jobs: | 621 | 621 | - build_wasi | 622 | 622 | - build_windows | 623 | 623 | - build_windows_msi | | 624 | + - cross-build-linux | 624 | 625 | - test_hypothesis | 625 | 626 | - build_asan | 626 | 627 | - build_tsan | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/tail-call.yml +14-1Lines changed: 14 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 41 | 41 | - aarch64-apple-darwin/clang | 42 | 42 | - x86_64-unknown-linux-gnu/gcc | 43 | 43 | - aarch64-unknown-linux-gnu/gcc | | 44 | + - free-threading | 44 | 45 | llvm: | 45 | 46 | - 19 | 46 | 47 | include: | | 65 | 66 | - target: aarch64-unknown-linux-gnu/gcc | 66 | 67 | architecture: aarch64 | 67 | 68 | runner: ubuntu-22.04-arm | | 69 | + - target: free-threading | | 70 | + architecture: x86_64 | | 71 | + runner: ubuntu-24.04 | 68 | 72 | steps: | 69 | 73 | - uses: actions/checkout@v4 | 70 | 74 | with: | @@ -105,11 +109,20 @@ jobs: | 105 | 109 | ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 | 106 | 110 |
| 107 | 111 | - name: Native Linux (release) | 108 | | - if: runner.os == 'Linux' | | 112 | + if: runner.os == 'Linux' && matrix.target != 'free-threading' | 109 | 113 | run: | | 110 | 114 | sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} | 111 | 115 | export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" | 112 | 116 | CC=clang-19 ./configure --with-tail-call-interp | 113 | 117 | make all --jobs 4 | 114 | 118 | ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 | 115 | 119 |
| | 120 | + - name: Native Linux with free-threading (release) | | 121 | + if: matrix.target == 'free-threading' | | 122 | + run: | | | 123 | + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} | | 124 | + export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" | | 125 | + CC=clang-19 ./configure --with-tail-call-interp --disable-gil | | 126 | + make all --jobs 4 | | 127 | + ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 | | 128 | +
|
Collapse file Copy file name to clipboardExpand all lines: Doc/c-api/typeobj.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1830,7 +1830,7 @@ and :c:data:`PyType_Type` effectively act as defaults.) | 1830 | 1830 | dictionary, so it is may be more efficient to call :c:func:`PyObject_GetAttr` | 1831 | 1831 | when accessing an attribute on the object. | 1832 | 1832 |
| 1833 | | - It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit and | | 1833 | + It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and | 1834 | 1834 | :c:member:`~PyTypeObject.tp_dictoffset`. | 1835 | 1835 |
| 1836 | 1836 | **Inheritance:** | |
Collapse file Copy file name to clipboardExpand all lines: Doc/library/traceback.rst +5Lines changed: 5 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -257,6 +257,11 @@ Module-Level Functions | 257 | 257 |
| 258 | 258 | .. versionadded:: 3.5 | 259 | 259 |
| | 260 | + .. versionchanged:: 3.14 | | 261 | + This function previously returned a generator that would walk the stack | | 262 | + when first iterated over. The generator returned now is the state of the | | 263 | + stack when ``walk_stack`` is called. | | 264 | + | 260 | 265 | .. function:: walk_tb(tb) | 261 | 266 |
| 262 | 267 | Walk a traceback following :attr:`~traceback.tb_next` yielding the frame and | |
Collapse file Copy file name to clipboardExpand all lines: Doc/using/configure.rst +3Lines changed: 3 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -575,6 +575,9 @@ also be used to improve performance. | 575 | 575 | .. versionchanged:: 3.12 | 576 | 576 | Use ThinLTO as the default optimization policy on Clang if the compiler accepts the flag. | 577 | 577 |
| | 578 | + .. versionchanged:: next | | 579 | + Revert to using full LTO as the default optimization policy on Clang. | | 580 | + | 578 | 581 | .. option:: --enable-bolt | 579 | 582 |
| 580 | 583 | Enable usage of the `BOLT post-link binary optimizer | |
Collapse file Copy file name to clipboardExpand all lines: Doc/whatsnew/3.14.rst +16-1Lines changed: 16 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -165,7 +165,7 @@ Improved error messages | 165 | 165 | error message prints the received number of values in more cases than before. | 166 | 166 | (Contributed by Tushar Sadhwani in :gh:`122239`.) | 167 | 167 |
| 168 | | - .. code-block:: pycon | | 168 | + .. code-block:: python | 169 | 169 |
| 170 | 170 | >>> x, y, z = 1, 2, 3, 4 | 171 | 171 | Traceback (most recent call last): | @@ -196,6 +196,17 @@ Improved error messages | 196 | 196 | SyntaxError: statement given where 'body' expression required | 197 | 197 |
| 198 | 198 |
| | 199 | +* When incorrectly closed strings are detected, the error message suggests | | 200 | + that the string may be intended to be part of the string. (Contributed by | | 201 | + Pablo Galindo in :gh:`88535`.) | | 202 | + | | 203 | + .. code-block:: python | | 204 | +
| | 205 | + >>> "The interesting object "The important object" is very important" | | 206 | + Traceback (most recent call last): | | 207 | + SyntaxError: invalid syntax. Is this intended to be part of the string? | | 208 | +
| | 209 | +
| 199 | 210 | .. _whatsnew314-pep741: | 200 | 211 |
| 201 | 212 | PEP 741: Python Configuration C API | @@ -1289,6 +1300,10 @@ Build changes | 1289 | 1300 | * GNU Autoconf 2.72 is now required to generate :file:`configure`. | 1290 | 1301 | (Contributed by Erlend Aasland in :gh:`115765`.) | 1291 | 1302 |
| | 1303 | +* CPython now uses Full LTO as the default link time optimization policy | | 1304 | + on Clang. This reverts an earlier change in CPython 3.12. | | 1305 | + (Contributed by Ken Jin in :gh:`130049`.) | | 1306 | + | 1292 | 1307 | .. _whatsnew314-pep761: | 1293 | 1308 |
| 1294 | 1309 | PEP 761: Discontinuation of PGP signatures | |
Collapse file Copy file name to clipboardExpand all lines: Grammar/python.gram +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1187,6 +1187,9 @@ invalid_type_param: | 1187 | 1187 | } | 1188 | 1188 |
| 1189 | 1189 | invalid_expression: | | 1190 | + | STRING a=(!STRING expression_without_invalid)+ STRING { | | 1191 | + RAISE_SYNTAX_ERROR_KNOWN_RANGE( PyPegen_first_item(a, expr_ty), PyPegen_last_item(a, expr_ty), | | 1192 | + "invalid syntax. Is this intended to be part of the string?") } | 1190 | 1193 | # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf"dsfsdf" | 1191 | 1194 | # Soft keywords need to also be ignored because they can be parsed as NAME NAME | 1192 | 1195 | | !(NAME STRING | SOFT_KEYWORD) a=disjunction b=expression_without_invalid { | |
Collapse file Copy file name to clipboardExpand all lines: Include/internal/pycore_ceval.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -274,7 +274,7 @@ PyAPI_FUNC(PyObject *) _PyEval_ImportName(PyThreadState *, _PyInterpreterFrame * | 274 | 274 | PyAPI_FUNC(PyObject *)_PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type, Py_ssize_t nargs, PyObject *kwargs); | 275 | 275 | PyAPI_FUNC(PyObject *)_PyEval_MatchKeys(PyThreadState *tstate, PyObject *map, PyObject *keys); | 276 | 276 | PyAPI_FUNC(void) _PyEval_MonitorRaise(PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *instr); | 277 | | -PyAPI_FUNC(int) _PyEval_UnpackIterableStackRef(PyThreadState *tstate, _PyStackRef v, int argcnt, int argcntafter, _PyStackRef *sp); | | 277 | +PyAPI_FUNC(int) _PyEval_UnpackIterableStackRef(PyThreadState *tstate, PyObject *v, int argcnt, int argcntafter, _PyStackRef *sp); | 278 | 278 | PyAPI_FUNC(void) _PyEval_FrameClearAndPop(PyThreadState *tstate, _PyInterpreterFrame *frame); | 279 | 279 | PyAPI_FUNC(PyObject **) _PyObjectArray_FromStackRefArray(_PyStackRef *input, Py_ssize_t nargs, PyObject **scratch); | 280 | 280 |
| |
Collapse file Copy file name to clipboardExpand all lines: Include/internal/pycore_opcode_metadata.h +16-16Lines changed: 16 additions & 16 deletions
|