mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
gh-112075: Make instance attributes stored in inline "dict" thread safe (#114742)
Make instance attributes stored in inline "dict" thread safe on free-threaded builds
This commit is contained in:
parent
1446024124
commit
8b541c017e
13 changed files with 419 additions and 142 deletions
|
@ -873,6 +873,15 @@ class TestInlineValues(unittest.TestCase):
|
|||
obj.foo = None # Aborted here
|
||||
self.assertEqual(obj.__dict__, {"foo":None})
|
||||
|
||||
def test_store_attr_deleted_dict(self):
|
||||
class Foo:
|
||||
pass
|
||||
|
||||
f = Foo()
|
||||
del f.__dict__
|
||||
f.a = 3
|
||||
self.assertEqual(f.a, 3)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue