Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 20f3dac

Browse filesBrowse files
committed
Merge remote-tracking branch 'upstream/main' into fix-union-forwardref
2 parents dd36a62 + a4ea80d commit 20f3dac
Copy full SHA for 20f3dac
Expand file treeCollapse file tree

39 files changed

+783
-347
lines changed

‎.github/CODEOWNERS

Copy file name to clipboardExpand all lines: .github/CODEOWNERS
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Modules/Setup* @erlend-aasland
3030
Objects/set* @rhettinger
3131
Objects/dict* @methane @markshannon
3232
Objects/typevarobject.c @JelleZijlstra
33+
Objects/unionobject.c @JelleZijlstra
3334
Objects/type* @markshannon
3435
Objects/codeobject.c @markshannon
3536
Objects/frameobject.c @markshannon

‎.github/zizmor.yml

Copy file name to clipboardExpand all lines: .github/zizmor.yml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ rules:
44
dangerous-triggers:
55
ignore:
66
- documentation-links.yml
7+
unpinned-uses:
8+
config:
9+
policies:
10+
"*": ref-pin

‎.pre-commit-config.yaml

Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.4
3+
rev: v0.11.6
44
hooks:
55
- id: ruff
66
name: Run Ruff (lint) on Doc/
@@ -24,7 +24,7 @@ repos:
2424
files: ^Doc/
2525

2626
- repo: https://github.com/psf/black-pre-commit-mirror
27-
rev: 24.10.0
27+
rev: 25.1.0
2828
hooks:
2929
- id: black
3030
name: Run Black on Tools/build/check_warnings.py
@@ -49,7 +49,7 @@ repos:
4949
types_or: [c, inc, python, rst]
5050

5151
- repo: https://github.com/python-jsonschema/check-jsonschema
52-
rev: 0.31.0
52+
rev: 0.33.0
5353
hooks:
5454
- id: check-dependabot
5555
- id: check-github-workflows
@@ -61,7 +61,7 @@ repos:
6161
- id: actionlint
6262

6363
- repo: https://github.com/woodruffw/zizmor-pre-commit
64-
rev: v1.1.1
64+
rev: v1.6.0
6565
hooks:
6666
- id: zizmor
6767

‎Doc/c-api/complex.rst

Copy file name to clipboardExpand all lines: Doc/c-api/complex.rst
-54Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,12 @@ pointers. This is consistent throughout the API.
4444
representation.
4545
4646
47-
.. c:function:: Py_complex _Py_cr_sum(Py_complex left, double right)
48-
49-
Return the sum of a complex number and a real number, using the C :c:type:`Py_complex`
50-
representation.
51-
52-
.. versionadded:: 3.14
53-
54-
5547
.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
5648
5749
Return the difference between two complex numbers, using the C
5850
:c:type:`Py_complex` representation.
5951
6052
61-
.. c:function:: Py_complex _Py_cr_diff(Py_complex left, double right)
62-
63-
Return the difference between a complex number and a real number, using the C
64-
:c:type:`Py_complex` representation.
65-
66-
.. versionadded:: 3.14
67-
68-
69-
.. c:function:: Py_complex _Py_rc_diff(double left, Py_complex right)
70-
71-
Return the difference between a real number and a complex number, using the C
72-
:c:type:`Py_complex` representation.
73-
74-
.. versionadded:: 3.14
75-
76-
7753
.. c:function:: Py_complex _Py_c_neg(Py_complex num)
7854
7955
Return the negation of the complex number *num*, using the C
@@ -86,14 +62,6 @@ pointers. This is consistent throughout the API.
8662
representation.
8763
8864
89-
.. c:function:: Py_complex _Py_cr_prod(Py_complex left, double right)
90-
91-
Return the product of a complex number and a real number, using the C
92-
:c:type:`Py_complex` representation.
93-
94-
.. versionadded:: 3.14
95-
96-
9765
.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
9866
9967
Return the quotient of two complex numbers, using the C :c:type:`Py_complex`
@@ -103,28 +71,6 @@ pointers. This is consistent throughout the API.
10371
:c:data:`errno` to :c:macro:`!EDOM`.
10472
10573
106-
.. c:function:: Py_complex _Py_cr_quot(Py_complex dividend, double divisor)
107-
108-
Return the quotient of a complex number and a real number, using the C
109-
:c:type:`Py_complex` representation.
110-
111-
If *divisor* is zero, this method returns zero and sets
112-
:c:data:`errno` to :c:macro:`!EDOM`.
113-
114-
.. versionadded:: 3.14
115-
116-
117-
.. c:function:: Py_complex _Py_rc_quot(double dividend, Py_complex divisor)
118-
119-
Return the quotient of a real number and a complex number, using the C
120-
:c:type:`Py_complex` representation.
121-
122-
If *divisor* is zero, this method returns zero and sets
123-
:c:data:`errno` to :c:macro:`!EDOM`.
124-
125-
.. versionadded:: 3.14
126-
127-
12874
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
12975
13076
Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex`

‎Doc/c-api/unicode.rst

Copy file name to clipboardExpand all lines: Doc/c-api/unicode.rst
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,17 @@ generic ones are documented for simplicity.
10261026
Generic Codecs
10271027
""""""""""""""
10281028
1029+
The following macro is provided:
1030+
1031+
1032+
.. c:macro:: Py_UNICODE_REPLACEMENT_CHARACTER
1033+
1034+
The Unicode code point ``U+FFFD`` (replacement character).
1035+
1036+
This Unicode character is used as the replacement character during
1037+
decoding if the *errors* argument is set to "replace".
1038+
1039+
10291040
These are the generic codec APIs:
10301041
10311042

‎Doc/library/socket.rst

Copy file name to clipboardExpand all lines: Doc/library/socket.rst
+50-3Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,15 +677,62 @@ Constants
677677
These constants describe the Bluetooth address type when binding or
678678
connecting a :const:`BTPROTO_L2CAP` socket.
679679

680+
.. availability:: Linux, FreeBSD
681+
680682
.. versionadded:: 3.14
681683

684+
.. data:: SOL_RFCOMM
685+
SOL_L2CAP
686+
SOL_HCI
687+
SOL_SCO
688+
SOL_BLUETOOTH
689+
690+
Used in the level argument to the :meth:`~socket.setsockopt` and
691+
:meth:`~socket.getsockopt` methods of Bluetooth socket objects.
692+
693+
:const:`SOL_BLUETOOTH` is only available on Linux. Other constants
694+
are available if the corresponding protocol is supported.
695+
696+
.. data:: SO_L2CAP_*
697+
L2CAP_LM
698+
L2CAP_LM_*
699+
SO_RFCOMM_*
700+
RFCOMM_LM_*
701+
SO_SCO_*
702+
SO_BTH_*
703+
BT_*
704+
705+
Used in the option name and value argument to the :meth:`~socket.setsockopt`
706+
and :meth:`~socket.getsockopt` methods of Bluetooth socket objects.
707+
708+
:const:`!BT_*` and :const:`L2CAP_LM` are only available on Linux.
709+
:const:`!SO_BTH_*` are only available on Windows.
710+
Other constants may be available on Linux and various BSD platforms.
711+
712+
.. versionadded:: next
713+
682714
.. data:: HCI_FILTER
683715
HCI_TIME_STAMP
684716
HCI_DATA_DIR
717+
SO_HCI_EVT_FILTER
718+
SO_HCI_PKT_FILTER
685719

686-
For use with :const:`BTPROTO_HCI`. :const:`!HCI_FILTER` is only
687-
available on Linux and FreeBSD. :const:`!HCI_TIME_STAMP` and
688-
:const:`!HCI_DATA_DIR` are only available on Linux.
720+
Option names for use with :const:`BTPROTO_HCI`.
721+
Availability and format of the option values depend on platform.
722+
723+
.. versionchanged:: next
724+
Added :const:`!SO_HCI_EVT_FILTER` and :const:`!SO_HCI_PKT_FILTER`
725+
on NetBSD and DragonFly BSD.
726+
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD.
727+
728+
.. data:: HCI_DEV_NONE
729+
730+
The ``device_id`` value used to create an HCI socket that isn't specific
731+
to a single Bluetooth adapter.
732+
733+
.. availability:: Linux
734+
735+
.. versionadded:: next
689736

690737
.. data:: HCI_CHANNEL_RAW
691738
HCI_CHANNEL_USER

‎Doc/whatsnew/3.14.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.14.rst
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,32 @@ pydoc
10881088
(Contributed by Jelle Zijlstra in :gh:`101552`.)
10891089

10901090

1091+
socket
1092+
------
1093+
1094+
* Improve and fix support for Bluetooth sockets.
1095+
1096+
* Fix support of Bluetooth sockets on NetBSD and DragonFly BSD.
1097+
(Contributed by Serhiy Storchaka in :gh:`132429`.)
1098+
* Fix support for :const:`~socket.BTPROTO_HCI` on FreeBSD.
1099+
(Contributed by Victor Stinner in :gh:`111178`.)
1100+
* Add support for :const:`~socket.BTPROTO_SCO` on FreeBSD.
1101+
(Contributed by Serhiy Storchaka in :gh:`85302`.)
1102+
* Add support for *cid* and *bdaddr_type* in the address for
1103+
:const:`~socket.BTPROTO_L2CAP` on FreeBSD.
1104+
(Contributed by Serhiy Storchaka in :gh:`132429`.)
1105+
* Add support for *channel* in the address for
1106+
:const:`~socket.BTPROTO_HCI` on Linux.
1107+
(Contributed by Serhiy Storchaka in :gh:`70145`.)
1108+
* Accept an integer as the address for
1109+
:const:`~socket.BTPROTO_HCI` on Linux
1110+
(Contributed by Serhiy Storchaka in :gh:`132099`.)
1111+
* Return *cid* in :meth:`~socket.socket.getsockname` for
1112+
:const:`~socket.BTPROTO_L2CAP`.
1113+
(Contributed by Serhiy Storchaka in :gh:`132429`.)
1114+
* Add many new constants.
1115+
(Contributed by Serhiy Storchaka in :gh:`132734`.)
1116+
10911117
ssl
10921118
---
10931119

‎Include/cpython/complexobject.h

Copy file name to clipboardExpand all lines: Include/cpython/complexobject.h
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ typedef struct {
99

1010
// Operations on complex numbers.
1111
PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
12-
PyAPI_FUNC(Py_complex) _Py_cr_sum(Py_complex, double);
1312
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
14-
PyAPI_FUNC(Py_complex) _Py_cr_diff(Py_complex, double);
15-
PyAPI_FUNC(Py_complex) _Py_rc_diff(double, Py_complex);
1613
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
1714
PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);
18-
PyAPI_FUNC(Py_complex) _Py_cr_prod(Py_complex, double);
1915
PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);
20-
PyAPI_FUNC(Py_complex) _Py_cr_quot(Py_complex, double);
21-
PyAPI_FUNC(Py_complex) _Py_rc_quot(double, Py_complex);
2216
PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);
2317
PyAPI_FUNC(double) _Py_c_abs(Py_complex);
2418

‎Include/internal/pycore_complexobject.h

Copy file name to clipboardExpand all lines: Include/internal/pycore_complexobject.h
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ extern int _PyComplex_FormatAdvancedWriter(
1919
Py_ssize_t start,
2020
Py_ssize_t end);
2121

22+
// Operations on complex numbers.
23+
PyAPI_FUNC(Py_complex) _Py_cr_sum(Py_complex, double);
24+
PyAPI_FUNC(Py_complex) _Py_cr_diff(Py_complex, double);
25+
PyAPI_FUNC(Py_complex) _Py_rc_diff(double, Py_complex);
26+
PyAPI_FUNC(Py_complex) _Py_cr_prod(Py_complex, double);
27+
PyAPI_FUNC(Py_complex) _Py_cr_quot(Py_complex, double);
28+
PyAPI_FUNC(Py_complex) _Py_rc_quot(double, Py_complex);
29+
30+
2231
#ifdef __cplusplus
2332
}
2433
#endif

‎Include/internal/pycore_opcode_metadata.h

Copy file name to clipboardExpand all lines: Include/internal/pycore_opcode_metadata.h
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.