1. 07 Haz, 2004 1 kayıt (commit)
  2. 21 Mar, 2004 1 kayıt (commit)
  3. 02 Mar, 2004 1 kayıt (commit)
  4. 20 Eki, 2003 1 kayıt (commit)
  5. 12 Eki, 2003 1 kayıt (commit)
  6. 27 Haz, 2003 1 kayıt (commit)
    • Raymond Hettinger's avatar
      SF bug #761337: datetime.strftime fails on trivial format string · f69d9f68
      Raymond Hettinger yazdı
      The interning of short strings violates the refcnt==1 assumption for
      _PyString_Resize().
      
      A simple fix is to boost the initial value of "totalnew" by 1.
      Combined with an NULL argument to PyString_FromStringAndSize(),
      this assures that resulting format string is not interned.
      This will remain true even if the implementation of
      PyString_FromStringAndSize() changes because only the uninitialized
      strings that can be interned are those of zero length.
      
      Added a test case.
      f69d9f68
  7. 18 May, 2003 1 kayıt (commit)
  8. 17 May, 2003 2 kayıt (commit)
  9. 16 May, 2003 2 kayıt (commit)
  10. 02 May, 2003 1 kayıt (commit)
  11. 14 Nis, 2003 1 kayıt (commit)
  12. 08 Şub, 2003 1 kayıt (commit)
  13. 07 Şub, 2003 1 kayıt (commit)
    • Tim Peters's avatar
      Comparison for timedelta, time, date and datetime objects: __eq__ and · 07534a60
      Tim Peters yazdı
      __ne__ no longer complain if they don't know how to compare to the other
      thing.  If no meaningful way to compare is known, saying "not equal" is
      sensible.  This allows things like
      
          if adatetime in some_sequence:
      and
          somedict[adatetime] = whatever
      
      to work as expected even if some_sequence contains non-datetime objects,
      or somedict non-datetime keys, because they only call __eq__.
      
      It still complains (raises TypeError) for mixed-type comparisons in
      contexts that require a total ordering, such as list.sort(), use as a
      key in a BTree-based data structure, and cmp().
      07534a60
  14. 04 Şub, 2003 1 kayıt (commit)
  15. 01 Şub, 2003 5 kayıt (commit)
  16. 31 Ock, 2003 2 kayıt (commit)
  17. 30 Ock, 2003 1 kayıt (commit)
  18. 24 Ock, 2003 2 kayıt (commit)
    • Tim Peters's avatar
      date and datetime comparison: when we don't know how to · 8d81a012
      Tim Peters yazdı
      compare against "the other" argument, we raise TypeError,
      in order to prevent comparison from falling back to the
      default (and worse than useless, in this case) comparison
      by object address.
      
      That's fine so far as it goes, but leaves no way for
      another date/datetime object to make itself comparable
      to our objects.  For example, it leaves Marc-Andre no way
      to teach mxDateTime dates how to compare against Python
      dates.
      
      Discussion on Python-Dev raised a number of impractical
      ideas, and the simple one implemented here:  when we don't
      know how to compare against "the other" argument, we raise
      TypeError *unless* the other object has a timetuple attr.
      In that case, we return NotImplemented instead, and Python
      will give the other object a shot at handling the
      comparison then.
      
      Note that comparisons of time and timedelta objects still
      suffer the original problem, though.
      8d81a012
    • Tim Peters's avatar
      Updated the astimezone() proof to recover from all the last week's · 8bb5ad2e
      Tim Peters yazdı
      changes (and there were a lot of relevant changes!).
      8bb5ad2e
  19. 23 Ock, 2003 5 kayıt (commit)
    • Neal Norwitz's avatar
      Fix typo · 2fbe5378
      Neal Norwitz yazdı
      2fbe5378
    • Tim Peters's avatar
      SF bug 660872: datetimetz constructors behave counterintuitively (2.3a1). · 2a44a8d3
      Tim Peters yazdı
      This gives much the same treatment to datetime.fromtimestamp(stamp, tz) as
      the last batch of checkins gave to datetime.now(tz):  do "the obvious"
      thing with the tz argument instead of a senseless thing.
      2a44a8d3
    • Tim Peters's avatar
      Reimplemented datetime.now() to be useful. · 10cadce4
      Tim Peters yazdı
      10cadce4
    • Tim Peters's avatar
    • Tim Peters's avatar
      Bringing the code and test suite into line with doc and NEWS changes · 52dcce24
      Tim Peters yazdı
      checked in two days agao:
      
      Refactoring of, and new rules for, dt.astimezone(tz).
      
      dt must be aware now, and tz.utcoffset() and tz.dst() must not return None.
      The old dt.astimezone(None) no longer works to change an aware datetime
      into a naive datetime; use dt.replace(tzinfo=None) instead.
      
      The tzinfo base class now supplies a new fromutc(self, dt) method, and
      datetime.astimezone(tz) invokes tz.fromutc().  The default implementation
      of fromutc() reproduces the same results as the old astimezone()
      implementation, but tzinfo subclasses can override fromutc() if the
      default implementation isn't strong enough to get the correct results
      in all cases (for example, this may be necessary if a tzinfo subclass
      models a time zone whose "standard offset" (wrt UTC) changed in some
      year(s), or in some variations of double-daylight time -- the creativity
      of time zone politics can't be captured in a single default implementation).
      52dcce24
  20. 20 Ock, 2003 1 kayıt (commit)
    • Tim Peters's avatar
      New rule for tzinfo subclasses handling both standard and daylight time: · 327098a6
      Tim Peters yazdı
      When daylight time ends, an hour repeats on the local clock (for example,
      in US Eastern, the clock jumps from 1:59 back to 1:00 again).  Times in
      the repeated hour are ambiguous.  A tzinfo subclass that wants to play
      with astimezone() needs to treat times in the repeated hour as being
      standard time.  astimezone() previously required that such times be
      treated as daylight time.  There seems no killer argument either way,
      but Guido wants the standard-time version, and it does seem easier the
      new way to code both American (local-time based) and European (UTC-based)
      switch rules, and the astimezone() implementation is simpler.
      327098a6
  21. 11 Ock, 2003 2 kayıt (commit)
  22. 10 Ock, 2003 3 kayıt (commit)
  23. 08 Ock, 2003 3 kayıt (commit)