Skip to content

Commit 9030ef9

Browse files
authored
Merge branch 'main' into Optimize_MAKE_FUNCTION
2 parents 603f0bd + 8c52450 commit 9030ef9

26 files changed

Lines changed: 1949 additions & 1344 deletions

.github/workflows/reusable-san.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
|| ''
6262
}}.txt handle_segv=0" >> "$GITHUB_ENV"
6363
else
64-
echo "UBSAN_OPTIONS=${SAN_LOG_OPTION}" >> "$GITHUB_ENV"
64+
echo "UBSAN_OPTIONS=${SAN_LOG_OPTION} halt_on_error=1 suppressions=${GITHUB_WORKSPACE}/Tools/ubsan/suppressions.txt" >> "$GITHUB_ENV"
6565
fi
6666
echo "CC=clang" >> "$GITHUB_ENV"
6767
echo "CXX=clang++" >> "$GITHUB_ENV"
@@ -75,18 +75,21 @@ jobs:
7575
${{
7676
inputs.sanitizer == 'TSan'
7777
&& '--with-thread-sanitizer'
78-
|| '--with-undefined-behavior-sanitizer'
78+
|| '--with-undefined-behavior-sanitizer --with-strict-overflow'
7979
}}
8080
--with-pydebug
8181
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
8282
- name: Build CPython
8383
run: make -j4
8484
- name: Display build info
8585
run: make pythoninfo
86+
# test_{capi,faulthandler} are skipped under UBSan because
87+
# they raise signals that UBSan with halt_on_error=1 intercepts.
8688
- name: Tests
8789
run: >-
8890
./python -m test
8991
${{ inputs.sanitizer == 'TSan' && '--tsan' || '' }}
92+
${{ inputs.sanitizer == 'UBSan' && '-x test_capi -x test_faulthandler' || '' }}
9093
-j4
9194
- name: Parallel tests
9295
if: >-

Doc/c-api/unicode.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,6 +1881,10 @@ object.
18811881
On success, return ``0``.
18821882
On error, set an exception, leave the writer unchanged, and return ``-1``.
18831883
1884+
To write a :class:`str` subclass which overrides the :meth:`~object.__str__`
1885+
method, :c:func:`PyUnicode_FromObject` can be used to get the original
1886+
string.
1887+
18841888
.. c:function:: int PyUnicodeWriter_WriteRepr(PyUnicodeWriter *writer, PyObject *obj)
18851889
18861890
Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*.

Doc/library/glob.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ The :mod:`!glob` module defines the following functions:
8383
This function may return duplicate path names if *pathname*
8484
contains multiple "``**``" patterns and *recursive* is true.
8585

86+
.. note::
87+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
88+
suppressed. This includes :exc:`PermissionError` when accessing
89+
directories without read permission.
90+
8691
.. versionchanged:: 3.5
8792
Support for recursive globs using "``**``".
8893

@@ -106,6 +111,11 @@ The :mod:`!glob` module defines the following functions:
106111
This function may return duplicate path names if *pathname*
107112
contains multiple "``**``" patterns and *recursive* is true.
108113

114+
.. note::
115+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
116+
suppressed. This includes :exc:`PermissionError` when accessing
117+
directories without read permission.
118+
109119
.. versionchanged:: 3.5
110120
Support for recursive globs using "``**``".
111121

Doc/library/pathlib.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,11 @@ Reading directories
13511351
``False``, this method follows symlinks except when expanding "``**``"
13521352
wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks.
13531353

1354+
.. note::
1355+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
1356+
suppressed. This includes :exc:`PermissionError` when accessing
1357+
directories without read permission.
1358+
13541359
.. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
13551360

13561361
.. versionchanged:: 3.12
@@ -1377,6 +1382,11 @@ Reading directories
13771382
The paths are returned in no particular order.
13781383
If you need a specific order, sort the results.
13791384

1385+
.. note::
1386+
Any :exc:`OSError` exceptions raised from scanning the filesystem are
1387+
suppressed. This includes :exc:`PermissionError` when accessing
1388+
directories without read permission.
1389+
13801390
.. seealso::
13811391
:ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation.
13821392

Include/internal/pycore_opcode_metadata.h

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

Include/internal/pycore_typeobject.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ extern PyTypeObject _PyBufferWrapper_Type;
126126
PyAPI_FUNC(PyObject*) _PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj,
127127
PyObject *name, int *meth_found);
128128

129+
extern PyObject *_PySuper_LookupDescr(PyTypeObject *su_type,
130+
PyTypeObject *su_obj_type,
131+
PyObject *name);
132+
129133
extern PyObject* _PyType_GetFullyQualifiedName(PyTypeObject *type, char sep);
130134

131135
// Perform the following operation, in a thread-safe way when required by the

0 commit comments

Comments
 (0)