Issue 1427: Error in standard module calendar (original) (raw)

Issue1427

Created on 2007-11-11 23:16 by gdamjan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
calendar.diff gdamjan,2007-11-11 23:16
calendar_fix.patch christian.heimes,2007-11-11 23:48
Messages (5)
msg57384 - (view) Author: Damjan Georgievski (gdamjan) Date: 2007-11-11 23:16
This is LocaleTextCalendar.__init__ def __init__(self, firstweekday=0, locale=None): TextCalendar.__init__(self, firstweekday) if locale is None: locale = locale.getdefaultlocale() self.locale = locale Which can not work, obviosly ... let me hilight the important part if locale is None: locale = locale.getdefaultlocale() ??? Attached is a patch that corrects this and keeps the signature of the method with the locale=None keyword.
msg57386 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-11 23:48
My patch uses "import locale as _locale" to avoid ambiguous variables. It also fixes some additional bugs. I still don't understand how prweek() should work. self.week is missing.
msg57387 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-11 23:48
wrong file
msg57390 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-12 01:28
I've applied my patch in r58936 (trunk) and r58937 (2.5 branch). I'm assigning the bug to Walter. Maybe he is able to shed some light on the prweek() issue. $ svn ann Lib/calendar.py | grep self\.week 43483 walter.doerwald print self.week(theweek, width),
msg57394 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-11-12 10:05
Fixed in r58942 (trunk) and r58943 (2.5). Closing the issue.
History
Date User Action Args
2022-04-11 14:56:28 admin set github: 45768
2007-11-12 10:05:17 doerwalter set status: open -> closedresolution: fixedmessages: +
2007-11-12 01:28:24 christian.heimes set assignee: doerwaltermessages: + nosy: + doerwalter
2007-11-11 23:48:44 christian.heimes set files: + calendar_fix.patchmessages: +
2007-11-11 23:48:28 christian.heimes set files: - calendar.diff
2007-11-11 23:48:11 christian.heimes set files: + calendar.diffversions: + Python 2.6, Python 3.0nosy: + christian.heimesmessages: + priority: normalkeywords: + patch
2007-11-11 23:16:40 gdamjan create