[ python-Bugs-1614460 ] python-logging compatability with Zope.
Bugs item #1614460, was opened at 2006-12-13 14:02 Message generated for change (Comment added) made by shookway You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1614460&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Closed >Resolution: None Priority: 5 Private: No Submitted By: Simon Hookway (shookway) Assigned to: Vinay Sajip (vsajip) Summary: python-logging compatability with Zope. Initial Comment: I'm using Zope2.8.x and python2.4. On shutdown removing the handlers causes a KeyError because the new _handlersList is not correctly updated and thus has a now non-existant handler in it. This double list/dict thing is a little cumbersome. I'm not sure either why it's a dict but i have replaced it with an OrderedDict so that old 2.3 logging behaviour works without modification. See the included patch. -- >Comment By: Simon Hookway (shookway) Date: 2007-02-12 10:57 Message: Logged In: YES user_id=1667120 Originator: YES "fixed in 2.5" -- that is the problem, why was this fix not rolled back to python2.4? I submit this patch for those of us out there still using 2.4 and likely to be using it for a while to come. Can we have it fixed in 2.4 please. -- Comment By: SourceForge Robot (sf-robot) Date: 2006-12-30 14:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). -- Comment By: Vinay Sajip (vsajip) Date: 2006-12-16 04:13 Message: Logged In: YES user_id=308438 Originator: NO Yes, a fix was applied a while ago. -- Comment By: Georg Brandl (gbrandl) Date: 2006-12-15 19:06 Message: Logged In: YES user_id=849994 Originator: NO I believe this was fixed in 2.5, but I could be mistaken. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1614460&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1650053 ] decimals compare badly to floats
Bugs item #1650053, was opened at 2007-02-01 13:20 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650053&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Brian Sutherland (jinty_) >Assigned to: Nobody/Anonymous (nobody) Summary: decimals compare badly to floats Initial Comment: This behaviour is so unexpected that I'm pretty sure it's a bug. If decimals can't be compared to floats, at least it should error. Found in python2.4 and 2.5 by at least 2 people: Python 2.5 (release25-maint, Dec 9 2006, 14:35:53) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal >>> 1172837167.27 > Decimal("1172837136.0800") False >>> 1172837167.27 > Decimal("1") False -- >Comment By: Raymond Hettinger (rhettinger) Date: 2007-02-12 02:40 Message: Logged In: YES user_id=80475 Originator: NO The __cmp__() method decimal.py is doing the right thing and returning NotImplemented. The odd result you're seeing is just Python's normal way of handling things it doesn't know how to compare. You get the same results by comparing floats to strings: >>> 1172837167.27 > "1172837136.0800" False >>> 1172837167.27 > "1" False I don't see a way to change this behavior without making deep incompatible changes to Python. If someone sees a way out, feel free to re-open this bug. -- Comment By: Raymond Hettinger (rhettinger) Date: 2007-02-01 15:24 Message: Logged In: YES user_id=80475 Originator: NO It was intended that Decimals not be compared to floats, but I think we can do better than returning a useless result -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650053&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com