[issue10092] calendar does not restore locale properly

2010-12-01 Thread R. David Murray
R. David Murray added the comment: Boštjan, please see issue 10466 for further information about your question on fr_FR vs French. Windows, as usual, does not follow the standards. -- ___ Python tracker

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Stephen Hansen
Stephen Hansen added the comment: On windows, "France" may work and "fr_FR" may not; yet on OSX its exactly the opposite. Its not consistant across platforms. -- ___ Python tracker ___

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: -belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Boštjan Mejak added the comment: Yes, I know this issue is closed but I wonder how could your Python interpreter not error on >>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) Please retry executing the above line of code in Python 2.7.1 interpreter and tell me if you

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Boštjan, Please don't add comments to closed issues. If you believe there is a remaining issue, please file a new report. Issue numbers are in good supply! This issue was fixed in r85728. It is best when this information is the last message on a clo

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Boštjan Mejak added the comment: >>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) is not valid because 'fr_FR' is not a valid value for the 'locale' argument What is valid is this: >>> calendar.LocaleTextCalendar(locale='French').formatmonthname(2010,10,10) -

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Changes by Boštjan Mejak : Removed file: http://bugs.python.org/file19316/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Changes by Boštjan Mejak : Removed file: http://bugs.python.org/file19306/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10092] calendar does not restore locale properly

2010-10-21 Thread Tim Golden
Tim Golden added the comment: I'm afraid this falls outside my particular area of knowledge, and also outside the remit of the bug tracker. Perhaps you could post to python-list to see if anyone there can help? -- ___ Python tracker

[issue10092] calendar does not restore locale properly

2010-10-20 Thread R. David Murray
R. David Murray added the comment: The bug tracker is not an appropriate place to get help on using Python. Please ask your question on a forum where you are more likely to get help, such as python-list. -- nosy: +r.david.murray ___ Python tracker

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak
Boštjan Mejak added the comment: Please respond... On Wed, Oct 20, 2010 at 7:05 PM, Boštjan Mejak wrote: > > BoÅ¡tjan Mejak added the comment: > > Thank you so much for your answer. The > locale.setlocale(category=locale.LC_NUMERIC, > locale="Slovenian") works like a charm in my applicat

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak
Boštjan Mejak added the comment: Thank you so much for your answer. The locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian") works like a charm in my application. Now the 'n' format specifier works as I want. But tell me whether the 'n' format specifier can be forced to round the f

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Tim Golden
Tim Golden added the comment: Boštjan, the code segment you quote is the *fallback* if the C module hasn't been built for some reason. The module simply calls through to the underlying C Library. I notice you're running on Windows, so this is a useful MS page: http://msdn.microsoft.com/en-us/li

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl
Georg Brandl added the comment: Bostjan, both your points are invalid. First, the locale settings that a machine supports vary greatly. "fr_FR" doesn't need to be a valid setting on your machine. Second, "val in None" will always fail. "val in (None, ...)" will succeed, since you're testi

[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak
Boštjan Mejak added the comment: >>> import calendar >>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\calendar.py", line 522, in formatmonthname with TimeEncoding(self.locale) as enco

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Georg Brandl
Changes by Georg Brandl : Removed file: http://bugs.python.org/file19286/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Georg Brandl
Georg Brandl added the comment: Let's see if r85735 fixed this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Stephen Hansen
Stephen Hansen added the comment: I can't be entirely sure, because a) I have never even glanced at the calendar module, and b) my locale-fu is very weak, but my buildbot has consistently failed on this test since this commit: =

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r85728. The problem was that unlike other system calls, setlocale() doesn't return the old setting but the new setting. The context manager that resets the locale therefore didn't work as intended. -- resolution: -> fixed status: open -> clo

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Boštjan Mejak
Boštjan Mejak added the comment: > > Would you like to try to make a patch for Python 3.2? I'm not that geeky. :) On Tue, Oct 19, 2010 at 8:36 PM, Éric Araujo wrote: > > Éric Araujo added the comment: > > Indeed. Would you like to try to make a patch for Python 3.2? Help is > here: htt

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Éric Araujo
Éric Araujo added the comment: Indeed. Would you like to try to make a patch for Python 3.2? Help is here: http://www.python.org/dev/ (especially http://www.python.org/dev/patches/ ) and here: http://docs.pythonsprints.com/core_development/beginners.html --

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Boštjan Mejak
Boštjan Mejak added the comment: It seems that calendar.LocaleTextCalendar() changes the locale for the current interpreter session to the one you pass to argument 'locale'. This is a bug to be fixed. -- nosy: +Retro ___ Python tracker

[issue10092] calendar does not restore locale properly

2010-10-19 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10092] calendar does not restore locale properly

2010-10-17 Thread JJeffries
Changes by JJeffries : -- nosy: +JJeffries ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +christian.heimes, georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> import calendar >>> calendar.TextCalendar().formatmonthname(2010,10,10) 'October 2010' >>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) 'octobre 2010' >>> calendar.TextCalendar().formatmonthname(2010,10,10) 'octobre 2010'