[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nils, thanks for the report. Guido, thanks for the clarification. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 84ac4376587e35d16b4d0977c4f330d9d04b690a by Raymond Hettinger in branch 'master': bpo-38761: Register WeakSet as a MutableSet (GH-17104) https://github.com/python/cpython/commit/84ac4376587e35d16b4d0977c4f330d9d04b690a -- _

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: As I wrote between the lines in the PR, this would be a bug in the weakref module, not a bug in collections.abc. -- ___ Python tracker ___

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +16610 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17104 ___ Python tracker __

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: We could register the WeakSet in _collections_abc, right after MutableSet is defined. That module only registered builtins so that it can avoid imports; however, since we know that WeakSet is already loaded, it is reasonable to add an import for registra

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Nils Kattenbeck
New submission from Nils Kattenbeck : Instances of weakref.WeakSet are not instances of Set and therefore not of MutableSet but they are instances of Collection. They however implement all required methods for a MutableSet and Weak(Key|Value)Dictionary are correctly identified. Is this just an