Skip to content
Open
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
197615e
Prebuild mro_dict for find_name_in_mro
sergey-miryanov Apr 6, 2025
b7842e0
Simplify find_name_in_mro_new and add some comments
sergey-miryanov Apr 16, 2025
a7a978c
Fix comment for find_namd_in_mro becase it returns strong ref now
sergey-miryanov Apr 16, 2025
b870751
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 17, 2025
a64d3a0
Allow fixup_slot_dispatchers fails
sergey-miryanov Apr 18, 2025
7e067e3
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 18, 2025
88a19d5
Revert "Allow fixup_slot_dispatchers fails"
sergey-miryanov Apr 18, 2025
860fbe7
Update comment about prebuild MRO-dict
sergey-miryanov Apr 18, 2025
52617cb
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 19, 2025
d46f493
Allow fixup_slot_dispatchers fails
sergey-miryanov Apr 22, 2025
8f7750e
Fix test_type_lookup_mro_reference test because it raises exception w…
sergey-miryanov Apr 22, 2025
0d17713
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 22, 2025
7f4c9c7
Update comment about building MRO dict
sergey-miryanov Apr 22, 2025
0d5375e
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 29, 2025
90296f0
Merge branch 'gh-132042-precalc-mro-dict' of github.com:sergey-miryan…
sergey-miryanov Apr 29, 2025
26bafbf
Remove END_TYPE_LOCK from fixup_slot_dispatchers
sergey-miryanov Apr 29, 2025
23aaee0
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 29, 2025
74eabaf
Trying to fix build
sergey-miryanov Apr 29, 2025
63ab044
Fix build
sergey-miryanov Apr 29, 2025
da778df
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Apr 29, 2025
b9a1208
Fix merge conflicts
sergey-miryanov Apr 29, 2025
39f987b
Fix merge conflicts
sergey-miryanov Apr 29, 2025
ede356d
Merge branch 'main' into gh-132042-precalc-mro-dict
sergey-miryanov Jun 24, 2025
b3874ce
Replace lock with assert
sergey-miryanov Jun 24, 2025
9cd3902
Fix fixup_slot_dispatchers definition
sergey-miryanov Jun 24, 2025
ce1ed2c
Revert "Replace lock with assert"
sergey-miryanov Jun 24, 2025
c71c8be
Replace lock with assert
sergey-miryanov Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -11460,10 +11460,7 @@ fixup_slot_dispatchers(PyTypeObject *type)
{
int res = 0;

// This lock isn't strictly necessary because the type has not been
// exposed to anyone else yet, but update_ont_slot calls find_name_in_mro
// where we'd like to assert that the type is locked.
BEGIN_TYPE_LOCK();
ASSERT_WORLD_STOPPED_OR_NEW_TYPE(type);

PyObject *mro = Py_NewRef(lookup_tp_mro(type));

Expand Down Expand Up @@ -11506,7 +11503,7 @@ fixup_slot_dispatchers(PyTypeObject *type)
Py_XDECREF(mro_dict);
Py_DECREF(mro);

END_TYPE_LOCK();
// END_TYPE_LOCK();
return res;
}

Expand Down
Loading