[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread miss-islington


miss-islington  added the comment:


New changeset 972aba86ede0bf254e16a760639a1ff8df298578 by Antoine Pitrou in 
branch '3.8':
[3.8] bpo-40895: Update weakref documentation to remove old warnings (GH-20687) 
(GH-20792)
https://github.com/python/cpython/commit/972aba86ede0bf254e16a760639a1ff8df298578


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread miss-islington


miss-islington  added the comment:


New changeset 049039832da3d02592d680cebf71ab8a665a6564 by Antoine Pitrou in 
branch '3.7':
[3.7] bpo-40895: Update weakref documentation to remove old warnings (GH-20687) 
(GH-20793)
https://github.com/python/cpython/commit/049039832da3d02592d680cebf71ab8a665a6564


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread miss-islington


miss-islington  added the comment:


New changeset 18e07ba931c68eb5ab5262d4e57fe58c302686de by Miss Islington (bot) 
in branch '3.9':
bpo-40895: Update weakref documentation to remove old warnings (GH-20687)
https://github.com/python/cpython/commit/18e07ba931c68eb5ab5262d4e57fe58c302686de


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +19989
pull_request: https://github.com/python/cpython/pull/20793

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou
nosy_count: 3.0 -> 4.0
pull_requests: +19988
pull_request: https://github.com/python/cpython/pull/20792

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19987
pull_request: https://github.com/python/cpython/pull/20791

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread miss-islington


miss-islington  added the comment:


New changeset 1642c0ef750f96664a98cadb09301d492098d2fb by Daniel Fortunov in 
branch 'master':
bpo-40895: Update weakref documentation to remove old warnings (GH-20687)
https://github.com/python/cpython/commit/1642c0ef750f96664a98cadb09301d492098d2fb


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-06 Thread Daniel Fortunov


Change by Daniel Fortunov :


--
keywords: +patch
pull_requests: +19901
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20687

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-06 Thread Daniel Fortunov


New submission from Daniel Fortunov :

The doccumentation at https://docs.python.org/3.10/library/weakref.html 
cautions that the WeakKeyDictionary and WeakValueDictionary are susceptible to 
the problem of dictionary mutation during iteration.

These notes present the user with a problem that has no easy solution.

I dug into the implementation and found that fortunately, Antoine Pitrou 
already addressed this challenge (10 years ago!) by introducing an 
_IterationGuard context manager to the implementation, which delays mutation 
while an iteration is in progress.

I asked for confirmation and Antoine agreed that these notes could be removed:
https://github.com/python/cpython/commit/c1baa601e2b558deb690edfdf334fceee3b03327#commitcomment-39514438

--
assignee: docs@python
components: Documentation
messages: 370860
nosy: dfortunov, docs@python
priority: normal
severity: normal
status: open
title: weakref documentation contains cautions about dictionary mutation 
problems that have been solved in the implementation
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com