8000 Merge remote-tracking branch 'upstream/main' into 3.14-empty-force-co… · python/cpython@5d40ced · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d40ced

Browse files
committed
Merge remote-tracking branch 'upstream/main' into 3.14-empty-force-color-no-color
2 parents 5027272 + e119526 commit 5d40ced

File tree

130 files changed

+3209
-2429
lines changed

Some content is hidden

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

130 files changed

+3209
-2429
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
1919
cancel-in-progress: true
2020

21+
env:
22+
FORCE_COLOR: 1
23+
2124
jobs:
2225
check_source:
2326
name: Change detection

.github/workflows/jit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ concurrency:
2525
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2626
cancel-in-progress: true
2727

28+
env:
29+
FORCE_COLOR: 1
30+
2831
jobs:
2932
interpreter:
3033
name: Interpreter (Debug)

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
required: true
1616
type: string
1717

18+
env:
19+
FORCE_COLOR: 1
20+
1821
jobs:
1922
build_macos:
2023
name: build and test (${{ inputs.os }})

.github/workflows/reusable-tsan.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
required: true
1919
type: string
2020

21+
env:
22+
FORCE_COLOR: 1
23+
2124
jobs:
2225
build_tsan_reusable:
2326
name: 'Thread sanitizer'

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ on:
2121
required: true
2222
type: string
2323

24+
env:
25+
FORCE_COLOR: 1
26+
2427
jobs:
2528
build_ubuntu_reusable:
2629
name: build and test (${{ inputs.os }})
2730
timeout-minutes: 60
2831
runs-on: ${{ inputs.os }}
2932
env:
30-
FORCE_COLOR: 1
3133
OPENSSL_VER: 3.0.15
3234
PYTHONSTRICTEXTENSIONBUILD: 1
3335
TERM: linux

.github/workflows/reusable-wasi.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
required: true
88
type: string
99

10+
env:
11+
FORCE_COLOR: 1
12+
1013
jobs:
1114
build_wasi_reusable:
1215
name: 'build and test'

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
permissions:
1212
contents: read
1313

14+
env:
15+
FORCE_COLOR: 1
16+
1417
jobs:
1518
build:
1619
name: installer for ${{ inputs.arch }}

.github/workflows/reusable-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
default: false
1919

2020
env:
21+
FORCE_COLOR: 1
2122
IncludeUwp: >-
2223
true
2324

Doc/deprecations/c-api-pending-removal-in-3.18.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Pending removal in Python 3.18
66
* :c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`.
77
* :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`.
88
* :c:func:`!_PyDict_Pop()`: :c:func:`PyDict_Pop`.
9+
* :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`.
10+
* :c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`:
11+
use :c:func:`PyLongWriter_Create`.
912
* :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`.
1013
* :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`.
1114
* :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`.

Doc/library/asyncio-graph.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ and debuggers.
5959
6060
async def main():
6161
async with asyncio.TaskGroup() as g:
62-
g.create_task(test())
62+
g.create_task(test(), name='test')
6363
6464
asyncio.run(main())
6565
6666
will print::
6767

68-
* Task(name='Task-2', id=0x1039f0fe0)
68+
* Task(name='test', id=0x1039f0fe0)
6969
+ Call stack:
7070
| File 't2.py', line 4, in async test()
7171
+ Awaited by:

Doc/library/dis.rst

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ the following command can be used to display the disassembly of
7575
>>> dis.dis(myfunc)
7676
2 RESUME 0
7777
<BLANKLINE>
78-
3 LOAD_GLOBAL 0 (len)
79-
PUSH_NULL
78+
3 LOAD_GLOBAL 1 (len + NULL)
8079
LOAD_FAST 0 (alist)
8180
CALL 1
8281
RETURN_VALUE
@@ -208,7 +207,6 @@ Example:
208207
...
209208
RESUME
210209
LOAD_GLOBAL
211-
PUSH_NULL
212210
LOAD_FAST
213211
CALL
214212
RETURN_VALUE
@@ -1217,28 +1215,21 @@ iterations of the loop.
12171215

12181216
.. opcode:: LOAD_ATTR (namei)
12191217

1220-
Replaces ``STACK[-1]`` with ``getattr(STACK[-1], co_names[namei>>1])``.
1218+
If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with
1219+
``getattr(STACK[-1], co_names[namei>>1])``.
12211220

1222-
.. versionchanged:: 3.12
1223-
If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is
1224-
pushed to the stack before the attribute or unbound method respectively.
1225-
1226-
.. versionchanged:: 3.14
1227-
Reverted change from 3.12. The low bit of ``namei`` has no special meaning.
1228-
1229-
1230-
.. opcode:: LOAD_METHOD (namei)
1231-
1232-
Attempt to load a method named ``co_names[namei>>1]`` from the ``STACK[-1]`` object.
1233-
``STACK[-1]`` is popped.
1221+
If the low bit of ``namei`` is set, this will attempt to load a method named
1222+
``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is popped.
12341223
This bytecode distinguishes two cases: if ``STACK[-1]`` has a method with the
12351224
correct name, the bytecode pushes the unbound method and ``STACK[-1]``.
12361225
``STACK[-1]`` will be used as the first argument (``self``) by :opcode:`CALL`
12371226
or :opcode:`CALL_KW` when calling the unbound method.
12381227
Otherwise, ``NULL`` and the object returned by
12391228
the attribute lookup are pushed.
12401229

1241-
.. versionadded:: 3.14
1230+
.. versionchanged:: 3.12
1231+
If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is
1232+
pushed to the stack before the attribute or unbound method respectively.
12421233

12431234

12441235
.. opcode:: LOAD_SUPER_ATTR (namei)
@@ -1935,6 +1926,12 @@ but are replaced by real opcodes or removed before bytecode is generated.
19351926
This opcode is now a pseudo-instruction.
19361927

19371928

1929+
.. opcode:: LOAD_METHOD
1930+
1931+
Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode
1932+
with a flag set in the arg.
1933+
1934+
19381935
.. _opcode_collections:
19391936

19401937
Opcode collections

Doc/library/http.cookies.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Morsel Objects
142142
version
143143
httponly
144144
samesite
145+
partitioned
145146

146147
The attribute :attr:`httponly` specifies that the cookie is only transferred
147148
in HTTP requests, and is not accessible through JavaScript. This is intended
@@ -151,6 +152,19 @@ Morsel Objects
151152
send the cookie along with cross-site requests. This helps to mitigate CSRF
152153
attacks. Valid values for this attribute are "Strict" and "Lax".
153154

155+
The attribute :attr:`partitioned` indicates to user agents that these
156+
cross-site cookies *should* only be available in the same top-level context
157+
that the cookie was first set in. For this to be accepted by the user agent,
158+
you **must** also set ``Secure``.
159+
160+
In addition, it is recommended to use the ``__Host`` prefix when setting
161+
partitioned cookies to make them bound to the hostname and not the
162+
registrable domain. Read
163+
`CHIPS (Cookies Having Independent Partitioned State)`_
164+
for full details and examples.
165+
166+
.. _CHIPS (Cookies Having Independent Partitioned State): https://github.com/privacycg/CHIPS/blob/main/README.md
167+
154168
The keys are case-insensitive and their default value is ``''``.
155169

156170
.. versionchanged:: 3.5
@@ -165,6 +179,9 @@ Morsel Objects
165179
.. versionchanged:: 3.8
166180
Added support for the :attr:`samesite` attribute.
167181

182+
.. versionchanged:: 3.14
183+
Added support for the :attr:`partitioned` attribute.
184+
168185

169186
.. attribute:: Morsel.value
170187

0 commit comments

Comments
 (0)
0