[issue14766] Non-naive time comparison throws naive time error

2012-05-09 Thread Chris Bergstresser
New submission from Chris Bergstresser : The datetime module says: An object d of type time or datetime may be naive or aware. d is aware if d.tzinfo is not None and d.tzinfo.utcoffset(d) does not return None. If d.tzinfo is None, or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns

[issue14766] Non-naive time comparison throws naive time error

2012-05-09 Thread Chris Bergstresser
Chris Bergstresser added the comment: It doesn't seem to be a bug in pytz. AFAICT, the only methods that get called during the time comparison is "utcoffset" on the UTC timezone, and "utcoffset" on the New York timezone. Looking closer at it, it seems t

[issue14766] Non-naive time comparison throws naive time error

2012-05-10 Thread Chris Bergstresser
Chris Bergstresser added the comment: That patch fixes the documentation there, but the description at the top of the distinction between naive and aware time objects at the top datetime module is still wrong. Here it is: - There are two kinds of date and time objects