﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15048	Test failing on Python 2.4 since year 2011 :)	Łukasz Rekucki	nobody	"Test test ""generic_views.WeekArchiveViewTests.test_week_view_allow_future"" fails on Python 2.4.6 in year 2011. The code in question is ""_date_from_string"" which uses time.strptime() which is a bit broken in Python 2.4: http://bugs.python.org/issue1643943

The failing test tries to list books in the 0th week of the next year. For the year 2012, Python 2.4 is a bit wrong about the date of the first Sunday:

{{{
# Python 2.4.6
>>> from time import strptime
>>> strptime(""2012__0__0"", ""%Y__%w__%U"")
(2011, 12, 25, 0, 0, 0, 6, -6, -1)
}}}

Well, 25th December 2011 is a Sunday, but the first Sunday of 2012 is 1st of January:

{{{
# Python 2.6.6
>>> from time import strptime
>>> strptime(""2012__0__0"", ""%Y__%w__%U"")
time.struct_time(tm_year=2012, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=1, tm_isdst=-1)
}}}

Generic views in Django 1.2 somehow don't seem affected by this.



"		closed	Generic views	dev		fixed	blocker		Accepted	0	0	0	0	0	0
