Skip to content

Commit e9bae12

Browse files
committed
Resolved merge conflict in Tools/tsan/suppressions_free_threading.txt
2 parents edd9b7b + 63add11 commit e9bae12

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

Doc/library/enum.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Data Types
279279
>>> Color.RED.value
280280
1
281281

282-
Value of the member, can be set in :meth:`~object.__new__`.
282+
Value of the member, can be set in :meth:`~Enum.__new__`.
283283

284284
.. note:: Enum member values
285285

@@ -299,7 +299,7 @@ Data Types
299299

300300
.. attribute:: Enum._value_
301301

302-
Value of the member, can be set in :meth:`~object.__new__`.
302+
Value of the member, can be set in :meth:`~Enum.__new__`.
303303

304304
.. attribute:: Enum._order_
305305

@@ -407,8 +407,8 @@ Data Types
407407

408408
results in the call ``int('1a', 16)`` and a value of ``17`` for the member.
409409

410-
..note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
411-
call the appropriate ``__new__`` instead.
410+
.. note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
411+
call the appropriate ``__new__`` instead.
412412

413413
.. method:: Enum.__repr__(self)
414414

@@ -827,7 +827,7 @@ Supported ``__dunder__`` names
827827
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member``
828828
items. It is only available on the class.
829829

830-
:meth:`~object.__new__`, if specified, must create and return the enum members;
830+
:meth:`~Enum.__new__`, if specified, must create and return the enum members;
831831
it is also a very good idea to set the member's :attr:`!_value_` appropriately.
832832
Once all the members are created it is no longer used.
833833

Include/object.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,11 @@ _Py_ThreadId(void)
303303
static inline Py_ALWAYS_INLINE int
304304
_Py_IsOwnedByCurrentThread(PyObject *ob)
305305
{
306+
#ifdef _Py_THREAD_SANITIZER
307+
return _Py_atomic_load_uintptr_relaxed(&ob->ob_tid) == _Py_ThreadId();
308+
#else
306309
return ob->ob_tid == _Py_ThreadId();
310+
#endif
307311
}
308312
#endif
309313

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove unhandled ``PY_MONITORING_EVENT_BRANCH`` and ``PY_MONITORING_EVENT_EXCEPTION_HANDLED`` events from :func:`sys.settrace`.

Python/instruction_sequence.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ typedef _Py_SourceLocation location;
2020
#define INITIAL_INSTR_SEQUENCE_SIZE 100
2121
#define INITIAL_INSTR_SEQUENCE_LABELS_MAP_SIZE 10
2222

23+
#include "clinic/instruction_sequence.c.h"
24+
2325
#undef SUCCESS
2426
#undef ERROR
2527
#define SUCCESS 0
@@ -172,8 +174,6 @@ class InstructionSequenceType "_PyInstructionSequence *" "&_PyInstructionSequenc
172174
[clinic start generated code]*/
173175
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=589963e07480390f]*/
174176

175-
#include "clinic/instruction_sequence.c.h"
176-
177177
static _PyInstructionSequence*
178178
inst_seq_create(void)
179179
{

Python/legacy_tracing.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,9 @@ _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg)
599599
(1 << PY_MONITORING_EVENT_PY_START) | (1 << PY_MONITORING_EVENT_PY_RESUME) |
600600
(1 << PY_MONITORING_EVENT_PY_RETURN) | (1 << PY_MONITORING_EVENT_PY_YIELD) |
601601
(1 << PY_MONITORING_EVENT_RAISE) | (1 << PY_MONITORING_EVENT_LINE) |
602-
(1 << PY_MONITORING_EVENT_JUMP) | (1 << PY_MONITORING_EVENT_BRANCH) |
602+
(1 << PY_MONITORING_EVENT_JUMP) |
603603
(1 << PY_MONITORING_EVENT_PY_UNWIND) | (1 << PY_MONITORING_EVENT_PY_THROW) |
604-
(1 << PY_MONITORING_EVENT_STOP_ITERATION) |
605-
(1 << PY_MONITORING_EVENT_EXCEPTION_HANDLED);
604+
(1 << PY_MONITORING_EVENT_STOP_ITERATION);
606605

607606
PyFrameObject* frame = PyEval_GetFrame();
608607
if (frame->f_trace_opcodes) {

0 commit comments

Comments
 (0)