[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Backported to 3.1 in r88556, and 2.7 in r88564. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: georg.brandl (2010-12-03 10:20): Don't worry, it will be ported. When? Why would it *not* be merged to the 2.7 and 3.1 branches at the time the bug is closed? Delaying the port only increases the chance that the fix will fall between the

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Let's reopen until then. -- assignee: pitrou - resolution: fixed - accepted stage: - committed/rejected status: closed - open versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-01-31 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Because I don't think porting every change immediately is worth my time when I can do it much faster in mass-merges. I know other developers do this differently, but since I use svnmerge to do my mass-merges, there won't be any falling through

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-03 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This fix needs backporting to the 3.1 and 2.7 branches as well. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Don't worry, it will be ported. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I agree; committed in r86960. If anyone wants to change this to raise TypeError for objects that are both unhashable and unrefable, please speak up. -- resolution: - fixed status: open - closed ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-21 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I don't have any other insights on this one. Assigned by to Antoine who appears to have put some thought into it. -- assignee: rhettinger - pitrou ___ Python tracker

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well if WeakKeyDictionary silences the TypeError from ref(), it sounds consistent for WeakSet to silence it too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
New submission from Tres Seaver tsea...@agendaless.com: Because application code which tests for the presence of an object in a WeakSet may not be able to ensure that the object is weak-referenceable, the set should just return False for any object passed to '__contains__' which causes 'ref' to

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- components: +Library (Lib) keywords: +patch Added file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: A result from IRC is that to be consistent with normal sets, only TypeErrors coming from ref() should be caught, but not those TypeErrors from the actual membership test (i.e. the hash functioon of the value). -- assignee: - rhettinger

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19545/issue10360.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: A new version of the patch, which only traps TypeErrors raises by ref(item). The test now ensures that hashing errors are propagated, for compatibility with standard sets. -- Added file:

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: Removed file: http://bugs.python.org/file19546/issue10360-redux.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: One more time, with feeling. Sorry for the noise, the last patch was not against the 2.7 trunk. -- Added file: http://bugs.python.org/file19547/issue10360-redux.patch ___ Python tracker

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: FTR, the patch applies cleanly to the py3k branch, too. (Michael pointed out that the original code was copied directly from there). -- ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___ ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What is the behaviour of WeakKeyDictionary here? I don't really agree that TypeError should be silenced. -- nosy: +pitrou versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: WeakKeyDictionary's __contains__: def __contains__(self, key): try: wr = ref(key) except TypeError: return 0 return wr in self.data -- ___