<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_datetime.py, branch v2.3.6</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_datetime.py?h=v2.3.6</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_datetime.py?h=v2.3.6'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2004-06-07T23:17:48Z</updated>
<entry>
<title>SF 952807:  Unpickling pickled instances of subclasses of</title>
<updated>2004-06-07T23:17:48Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-06-07T23:17:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d8b9346a0d1f0bf99fbb0f71007f9de81b8d1088'/>
<id>urn:sha1:d8b9346a0d1f0bf99fbb0f71007f9de81b8d1088</id>
<content type='text'>
datetime.date, datetime.datetime and datetime.time could yield insane
objects.  Thanks to Jiwon Seo for a fix.
</content>
</entry>
<entry>
<title>SF bug #761337: datetime.strftime fails on trivial format string</title>
<updated>2003-06-27T08:14:17Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2003-06-27T08:14:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f69d9f6818225fc2613230c5dc11c181085db383'/>
<id>urn:sha1:f69d9f6818225fc2613230c5dc11c181085db383</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>datetime.timedelta is now subclassable in Python.  The new test shows</title>
<updated>2003-05-17T15:57:00Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-17T15:57:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac'/>
<id>urn:sha1:b0c854d6a747cd64ff7b23b8e9f9ef93ff8ac0ac</id>
<content type='text'>
one good use:  a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add).  The
native breakdown into days+seconds+us is often clumsy.  Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
</content>
</entry>
<entry>
<title>datetime.datetime and datetime.time can now be subclassed in Python.  Brr.</title>
<updated>2003-05-17T05:55:19Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-17T05:55:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a98924a063b6c8f94f7a03c78bd83e6131954381'/>
<id>urn:sha1:a98924a063b6c8f94f7a03c78bd83e6131954381</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test_subclass_date():  Beefed this up, to check that new instance</title>
<updated>2003-05-17T02:25:20Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-17T02:25:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=eb1a496039d39135188bbee20e348e796c4807ea'/>
<id>urn:sha1:eb1a496039d39135188bbee20e348e796c4807ea</id>
<content type='text'>
attributes and methods work, that new arguments can be passed to the
constructor, and that inherited methods and attrs still work.  Added
XXX comments about what to do when datetime becomes usably subclassable
too (it's not yet).
</content>
</entry>
<entry>
<title>The date class is now properly subclassable.  (SF bug #720908)</title>
<updated>2003-04-14T22:01:58Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2003-04-14T22:01:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8b7a9a38c66aff5633255b63be639ee8592f180b'/>
<id>urn:sha1:8b7a9a38c66aff5633255b63be639ee8592f180b</id>
<content type='text'>
(This is only the tip of the iceberg; the time and datetime classes
need the same treatment.)
</content>
</entry>
<entry>
<title>Whitespace normalization.</title>
<updated>2003-02-19T02:35:07Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-02-19T02:35:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f2715e076435b74638acb81512c2ee014f75aea2'/>
<id>urn:sha1:f2715e076435b74638acb81512c2ee014f75aea2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>The Python implementation of datetime was changed in ways that no longer</title>
<updated>2003-02-08T03:46:31Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-02-08T03:46:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=68124bb771697104add6c850139684729e2e6777'/>
<id>urn:sha1:68124bb771697104add6c850139684729e2e6777</id>
<content type='text'>
tickle the 2.2.2 __cmp__ bug test_datetime used to tickle, so the
workarounds for that bug no longer make sense in the test suite (which I'm
still trying to keep as closely in synch as possible with Zope3's
version).
</content>
</entry>
<entry>
<title>Comparison for timedelta, time, date and datetime objects:  __eq__ and</title>
<updated>2003-02-07T22:50:28Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-02-07T22:50:28Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=07534a607bd3d2fd232323811a83279acda10885'/>
<id>urn:sha1:07534a607bd3d2fd232323811a83279acda10885</id>
<content type='text'>
__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().
</content>
</entry>
<entry>
<title>Merge the test part of the below checkin to the sandbox and Zope3, so</title>
<updated>2003-02-07T21:49:01Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2003-02-07T21:49:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=275666fd50eaf494448ba102652d4273b135a017'/>
<id>urn:sha1:275666fd50eaf494448ba102652d4273b135a017</id>
<content type='text'>
the tests will remain in sync:

"""
Tres discovered a weird bug when a datetime is pickled, caused by the
shadowing of __year, __month, __day and the use of proxies.

Here's a quick fix and a quick unit test.  I don't quite understand
why this wasn't caught by the pickling unit tests.
"""
</content>
</entry>
</feed>
