Skip to content

Commit afa6cec

Browse files
authored
Merge branch 'main' into fix-issue-129107b
2 parents c3236ca + 45a24f5 commit afa6cec

24 files changed

+362
-275
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ jobs:
185185
needs: build-context
186186
if: fromJSON(needs.build-context.outputs.run-windows-msi)
187187
strategy:
188+
fail-fast: false
188189
matrix:
189190
arch:
190191
- x86
@@ -236,6 +237,7 @@ jobs:
236237
needs: build-context
237238
if: needs.build-context.outputs.run-tests == 'true'
238239
strategy:
240+
fail-fast: false
239241
matrix:
240242
bolt:
241243
- false
@@ -452,6 +454,7 @@ jobs:
452454
needs: build-context
453455
if: needs.build-context.outputs.run-tests == 'true'
454456
strategy:
457+
fail-fast: false
455458
matrix:
456459
os: [ubuntu-24.04]
457460
env:
@@ -515,6 +518,7 @@ jobs:
515518
needs: build-context
516519
if: needs.build-context.outputs.run-tests == 'true'
517520
strategy:
521+
fail-fast: false
518522
matrix:
519523
free-threading:
520524
- false

.github/workflows/jit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
runs-on: ubuntu-24.04
140140
timeout-minutes: 90
141141
strategy:
142+
fail-fast: false
142143
matrix:
143144
llvm:
144145
- 19

.github/workflows/project-updater.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 10
1717
strategy:
18+
fail-fast: false
1819
matrix:
1920
include:
2021
# if an issue has any of these labels, it will be added

Doc/library/socket.rst

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,19 @@ created. Socket addresses are represented as follows:
137137
- :const:`AF_BLUETOOTH` supports the following protocols and address
138138
formats:
139139

140-
- :const:`BTPROTO_L2CAP` accepts ``(bdaddr, psm)`` where ``bdaddr`` is
141-
the Bluetooth address as a string and ``psm`` is an integer.
140+
- :const:`BTPROTO_L2CAP` accepts a tuple
141+
``(bdaddr, psm[, cid[, bdaddr_type]])`` where:
142+
143+
- ``bdaddr`` is a string specifying the Bluetooth address.
144+
- ``psm`` is an integer specifying the Protocol/Service Multiplexer.
145+
- ``cid`` is an optional integer specifying the Channel Identifier.
146+
If not given, defaults to zero.
147+
- ``bdaddr_type`` is an optional integer specifying the address type;
148+
one of :const:`BDADDR_BREDR` (default), :const:`BDADDR_LE_PUBLIC`,
149+
:const:`BDADDR_LE_RANDOM`.
150+
151+
.. versionchanged:: next
152+
Added ``cid`` and ``bdaddr_type`` fields.
142153

143154
- :const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr``
144155
is the Bluetooth address as a string and ``channel`` is an integer.
@@ -626,6 +637,14 @@ Constants
626637
This constant contains a boolean value which indicates if IPv6 is supported on
627638
this platform.
628639

640+
.. data:: AF_BLUETOOTH
641+
BTPROTO_L2CAP
642+
BTPROTO_RFCOMM
643+
BTPROTO_HCI
644+
BTPROTO_SCO
645+
646+
Integer constants for use with Bluetooth addresses.
647+
629648
.. data:: BDADDR_ANY
630649
BDADDR_LOCAL
631650

@@ -634,6 +653,15 @@ Constants
634653
any address when specifying the binding socket with
635654
:const:`BTPROTO_RFCOMM`.
636655

656+
.. data:: BDADDR_BREDR
657+
BDADDR_LE_PUBLIC
658+
BDADDR_LE_RANDOM
659+
660+
These constants describe the Bluetooth address type when binding or
661+
connecting a :const:`BTPROTO_L2CAP` socket.
662+
663+
.. versionadded:: next
664+
637665
.. data:: HCI_FILTER
638666
HCI_TIME_STAMP
639667
HCI_DATA_DIR

Include/internal/pycore_magic_number.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ Known values:
269269
Python 3.14a5 3614 (Add BINARY_OP_EXTEND)
270270
Python 3.14a5 3615 (CALL_FUNCTION_EX always take a kwargs argument)
271271
Python 3.14a5 3616 (Remove BINARY_SUBSCR and family. Make them BINARY_OPs)
272+
Python 3.14a6 3617 (Branch monitoring for async for loops)
272273
273274
Python 3.15 will start with 3650
274275
@@ -281,7 +282,7 @@ PC/launcher.c must also be updated.
281282
282283
*/
283284

284-
#define PYC_MAGIC_NUMBER 3616
285+
#define PYC_MAGIC_NUMBER 3617
285286
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
286287
(little-endian) and then appending b'\r\n'. */
287288
#define PYC_MAGIC_NUMBER_TOKEN \

Include/internal/pycore_opcode_metadata.h

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode_ids.h

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/_opcode_metadata.py

Lines changed: 16 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/pathlib/_abc.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from abc import ABC, abstractmethod
1515
from glob import _PathGlobber, _no_recurse_symlinks
1616
from pathlib import PurePath, Path
17-
from pathlib._os import magic_open, CopyWriter
17+
from pathlib._os import magic_open, ensure_distinct_paths, copy_file
1818

1919

2020
def _explode_path(path):
@@ -347,13 +347,8 @@ def copy(self, target, follow_symlinks=True, dirs_exist_ok=False,
347347
"""
348348
if not hasattr(target, 'with_segments'):
349349
target = self.with_segments(target)
350-
351-
# Delegate to the target path's CopyWriter object.
352-
try:
353-
create = target._copy_writer._create
354-
except AttributeError:
355-
raise TypeError(f"Target is not writable: {target}") from None
356-
create(self, follow_symlinks, dirs_exist_ok, preserve_metadata)
350+
ensure_distinct_paths(self, target)
351+
copy_file(self, target, follow_symlinks, dirs_exist_ok, preserve_metadata)
357352
return target.joinpath() # Empty join to ensure fresh metadata.
358353

359354
def copy_into(self, target_dir, *, follow_symlinks=True,
@@ -424,7 +419,11 @@ def write_text(self, data, encoding=None, errors=None, newline=None):
424419
with magic_open(self, mode='w', encoding=encoding, errors=errors, newline=newline) as f:
425420
return f.write(data)
426421

427-
_copy_writer = property(CopyWriter)
422+
def _write_info(self, info, follow_symlinks=True):
423+
"""
424+
Write the given PathInfo to this path.
425+
"""
426+
pass
428427

429428

430429
JoinablePath.register(PurePath)

Lib/pathlib/_local.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
except ImportError:
2020
grp = None
2121

22-
from pathlib._os import LocalCopyWriter, PathInfo, DirEntryInfo, ensure_different_files
22+
from pathlib._os import (
23+
PathInfo, DirEntryInfo,
24+
ensure_different_files, ensure_distinct_paths,
25+
copy_file, copy_info,
26+
)
2327

2428

2529
__all__ = [
@@ -799,6 +803,12 @@ def write_text(self, data, encoding=None, errors=None, newline=None):
799803
with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
800804
return f.write(data)
801805

806+
def _write_info(self, info, follow_symlinks=True):
807+
"""
808+
Write the given PathInfo to this path.
809+
"""
810+
copy_info(info, self, follow_symlinks=follow_symlinks)
811+
802812
_remove_leading_dot = operator.itemgetter(slice(2, None))
803813
_remove_trailing_slash = operator.itemgetter(slice(-1))
804814

@@ -1083,22 +1093,15 @@ def replace(self, target):
10831093
target = self.with_segments(target)
10841094
return target
10851095

1086-
_copy_writer = property(LocalCopyWriter)
1087-
10881096
def copy(self, target, follow_symlinks=True, dirs_exist_ok=False,
10891097
preserve_metadata=False):
10901098
"""
10911099
Recursively copy this file or directory tree to the given destination.
10921100
"""
10931101
if not hasattr(target, 'with_segments'):
10941102
target = self.with_segments(target)
1095-
1096-
# Delegate to the target path's CopyWriter object.
1097-
try:
1098-
create = target._copy_writer._create
1099-
except AttributeError:
1100-
raise TypeError(f"Target is not writable: {target}") from None
1101-
create(self, follow_symlinks, dirs_exist_ok, preserve_metadata)
1103+
ensure_distinct_paths(self, target)
1104+
copy_file(self, target, follow_symlinks, dirs_exist_ok, preserve_metadata)
11021105
return target.joinpath() # Empty join to ensure fresh metadata.
11031106

11041107
def copy_into(self, target_dir, *, follow_symlinks=True,

0 commit comments

Comments
 (0)