Mailing List Archive

python/nondist/sandbox/datetime doc.txt,1.58,1.59
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv19694

Modified Files:
doc.txt
Log Message:
Removed CLOSED issues of no conceivable further interest.

Added new issue about pickle compatibility (or, rather, the lack thereof)
between the Python and C implementations.

Added new issue about a Python 2.2.2 bug uncovered by the test suite.


Index: doc.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/doc.txt,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** doc.txt 16 Dec 2002 03:58:51 -0000 1.58
--- doc.txt 16 Dec 2002 22:43:05 -0000 1.59
***************
*** 1,68 ****
TODO/OPEN
=========
! - The Python implementation has XXX comments, and so does the Wiki,
! saying that timezone conversion APIs should be defined. How about
! this for a datetimetz method:
!
! newtz(tzinfo)
! Convert to a new time zone. In dt.newtz(tz), an exception is raised
! if dt is naive, tz does not implement utcoffset(), or tz.utcoffset()
! returns None.
!
! Else a datetimetz is returned with tzinfo=tz, converting the date
! and time fields to local time in the tz time zone. This is
! equivalent to:
!
! def newtz(self, tzinfo):
! t = self - (self.utcoffset() - tzinfo.utcoffset())
! return datetimetz(t.year, t.month, t.day,
! t.hour, t.minute, t.second,
! t.microsecond, tzinfo=tzinfo)

! Note that this may overflow if dt.year is MINYEAR or MAXYEAR and
! the adjustments spill over a year boundary.

! - The Python implementation is missing docstrings in many places.

- LaTeXize the docs.

- - Move from sandbox to mainline.
-

CLOSED
======
- - The custom %z and %Z format codes for timetz and datetimetz
- .strftime needs a C implementation (yuck). More generally,
- %z and %Z are plain busted in the C implementation.
- Done.
-
- - datetimetz needs a C implementation. This seems "almost done". I
- suspect I'm missing some untested method(s) still in the Python
- implementation.
- Done: the missing method was datetimetz.utctimetuple().
-
- - timetz needs a C implementation.
- Done.
-
- - tzinfo needs a C implementation.
- Done.
-
- - Implement an abstract base tzinfo class. Variant tzinfo classes must
- subclass from this.
- Done.
-
- - Subclass relationships. Currently datetime is a subclass of date.
- I like this in practice, and think it's theoretically sound too.
- Should this be blessed? I expect the same questions to pop up for
- timetz wrt time, and datetimetz wrt datetime.
- Guido sez subclassing is fine. Add docs about the subclass
- relationships.
- Done.
-
- - The METH_CLASS bug affects about a dozen functions here. They'll need
- to be recoded in minor ways when the bug gets fixed. The bug needs to
- be fixed.
- Done.
-
- What should str() do? It generally acts like a synonym for isoformat()
now. But
--- 1,21 ----
TODO/OPEN
=========
! - The Python implementation is missing docstrings in many places.

! - Pickle incompatibility? It occurs to me that, because the
! implementations are so different, a pickle created by the Python
! implementation won't be unpicklable by the C implementation, or vice
! versa. If this is important, the Python implementation will have to
! change, as the C implementation of pickling took days to get working
! and has no wiggle room (TOOWTDI indeed <wink>).

! - The test suite doesn't pass under 2.2.2, due to what Guido tracked
! to a bug in 2.2.2's implementation of __cmp__ for new-style classes.

- LaTeXize the docs.


CLOSED
======
- What should str() do? It generally acts like a synonym for isoformat()
now. But