[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak

Changes by Boštjan Mejak bostjan.me...@gmail.com:


Removed file: http://bugs.python.org/file19306/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak

Changes by Boštjan Mejak bostjan.me...@gmail.com:


Removed file: http://bugs.python.org/file19316/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com 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)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net 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 closed issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com 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 get an error. I get this:
 import calendar
 calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10)
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Python27\lib\calendar.py, line 522, in formatmonthname
with TimeEncoding(self.locale) as encoding:
  File C:\Python27\lib\calendar.py, line 490, in __enter__
_locale.setlocale(_locale.LC_TIME, self.locale)
  File C:\Python27\lib\locale.py, line 531, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

--
Added file: http://bugs.python.org/file19894/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___Yes, I know this issue is closed but I wonder how could your Python interpreter 
not error ondivspan class=Apple-style-span style=font-family: arial, 
sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); 
gt;gt;gt; 
calendar.LocaleTextCalendar(locale=#39;fr_FR#39;).formatmonthname(2010,10,10)/span/div
divspan class=Apple-style-span style=font-family: arial, sans-serif; 
font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); 
br/span/divdivspan class=Apple-style-span style=font-family: 
arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 
0, 80); Please retry executing the above line of code in Python 2.7.1 
interpreter and tell me if you get an error. I get this:/span/div
divspan class=Apple-style-span style=font-family: arial, sans-serif; 
font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); 
divgt;gt;gt; import calendar/divdivgt;gt;gt; 
calendar.LocaleTextCalendar(locale=#39;fr_FR#39;).formatmonthname(2010,10,10)/div
divTraceback (most recent call last):/divdiv  File 
quot;lt;stdingt;quot;, line 1, in lt;modulegt;/divdiv  File 
quot;C:\Python27\lib\calendar.pyquot;, line 522, in 
formatmonthname/divdiv    with TimeEncoding(self.locale) as 
encoding:/div
div  File quot;C:\Python27\lib\calendar.pyquot;, line 490, in 
__enter__/divdiv    _locale.setlocale(_locale.LC_TIME, 
self.locale)/divdiv  File quot;C:\Python27\lib\locale.pyquot;, line 
531, in setlocale/div
div    return _setlocale(category, locale)/divdivlocale.Error: 
unsupported locale setting/div/span/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy:  -belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread Stephen Hansen

Stephen Hansen me+pyt...@ixokai.io 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 rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-12-01 Thread R. David Murray

R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-21 Thread Tim Golden

Tim Golden m...@timgolden.me.uk 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 rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Stephen Hansen

Stephen Hansen me+pyt...@ixokai.io 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:


==
ERROR: test_localecalendars (test.test_calendar.CalendarTestCase)
--
Traceback (most recent call last):
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_calendar.py,
 line 264, in test_localecalendars
locale=def_locale).formatmonthname(2010, 10, 10)
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py, 
line 520, in formatmonthname
with different_locale(self.locale):
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py, 
line 490, in __enter__
_locale.setlocale(_locale.LC_TIME, self.locale)
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/locale.py, line 
538, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

I will look into it in more detail tomorrow to try to provide more meaningful 
feedback, but I think this fix has introduced a problem. If someone sees what 
before I have time to dig into this unfamiliar territory, yay. :)

--
nosy: +ixokai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Let's see if r85735 fixed this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


Removed file: http://bugs.python.org/file19286/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com added the comment:

 import calendar
 calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10)
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Python27\lib\calendar.py, line 522, in formatmonthname
with TimeEncoding(self.locale) as encoding:
  File C:\Python27\lib\calendar.py, line 489, in __enter__
self.oldlocale = _locale.setlocale(_locale.LC_TIME, self.locale)
  File C:\Python27\lib\locale.py, line 531, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

Is it just my machine or is this a common thing on most machines? If I do a 
test and I try to set a locale with the setlocale() method, I get this 
locale.Error: unsupported locale setting. So I gather that the method 
setlocale() is broken and we should fix it before fixing the 
Locale{Text,HTML}Calendar ones.


The way setlocale() is implemented, is this:

def setlocale(category, value=None):
 setlocale(integer,string=None) - string.
Activates/queries locale processing.

if value not in (None, '', 'C'):
raise Error, '_locale emulation only supports C locale'
return 'C'


Please note that the online documentation documents its API like this:
locale.setlocale(category[, locale])  See 
http://docs.python.org/library/locale.html#locale.setlocale

So you can see that the implementation differs from the documentation in that 
it documents the 2nd argument as 'locale' where in the implementation there is 
'value'. If that's a bug, I don't know.

Anyway, please fix the implementation. I found out some very interesting 
thing... Note the line  if value not in (None, '', 'C')  in the 
implementation. This is the faulty thing in the function because NoneType is 
not iterable.

Test it for yourself in the interpreter:
 value = None
 value not in None
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: argument of type 'NoneType' is not iterable

So this setlocale() always raises an error. Please fix this.

Of course, this is valid:
 value = None
 value is not None
False

No error here. So try to combine this into a workable patch. Thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Georg Brandl

Georg Brandl ge...@python.org 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 testing membership in the given tuple that includes None.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Tim Golden

Tim Golden m...@timgolden.me.uk 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/library/x99tb11d%28VS.71%29.aspx

and you can see there that a call of setlocale (LC_ALL, English)
is valid (of French if you prefer):

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit 
(Intel)] on win32
Type help, copyright, credits or license for more information.
 import locale
 locale.setlocale (locale.LC_ALL, French)
'French_France.1252'


--
nosy: +tim.golden

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com 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 float to just one decimal place. I know
that the 'f' format specifier does that by specifying .1f, but 'f' is not
locale-aware. I have set the 'n' format specifier in my application like
.3n, which is okay if the returned number is two integers and one decimal,
but is not okay if the returned number is one integer and two decimals,
because I want just one decimal, always. How can I make that by using the
'n' format specifier?

On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden rep...@bugs.python.org wrote:


 Tim Golden m...@timgolden.me.uk 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/library/x99tb11d%28VS.71%29.aspx

 and you can see there that a call of setlocale (LC_ALL, English)
 is valid (of French if you prefer):

 Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
 (Intel)] on win32
 Type help, copyright, credits or license for more information.
  import locale
  locale.setlocale (locale.LC_ALL, French)
 'French_France.1252'
 

 --
 nosy: +tim.golden

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue10092
 ___


--
Added file: http://bugs.python.org/file19306/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___Thank you so much for your answer. The  span style=font-family:arial, 
sans-serif;font-size:13px;border-collapse:collapselocale.setlocale(category=locale.LC_NUMERIC,
 locale=quot;Slovenianquot;)  works like a charm in my application. Now the 
#39;n#39; format specifier works as I want. But tell me whether the 
#39;n#39; format specifier can be forced to round the float to just one 
decimal place. I know that the #39;f#39; format specifier does that by 
specifying quot;.1fquot;, but #39;f#39; is not locale-aware. I have set the 
#39;n#39; format specifier in my application like quot;.3nquot;, which is 
okay if the returned number is two integers and one decimal, but is not okay if 
the returned number is one integer and two decimals, because I want just one 
decimal, always. How can I make that by using the #39;n#39; format 
specifier?/spandiv
font class=Apple-style-span face=arial, sans-serifspan 
class=Apple-style-span style=border-collapse: 
collapse;br/span/font/divdivfont class=Apple-style-span 
face=arial, sans-serifspan class=Apple-style-span style=border-collapse: 
collapse;br
/span/fontdiv class=gmail_quoteOn Wed, Oct 20, 2010 at 11:37 AM, Tim 
Golden span dir=ltrlt;a href=mailto:rep...@bugs.python.org; 
target=_blankrep...@bugs.python.org/agt;/span wrote:brblockquote 
class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex

br
Tim Golden lt;a href=mailto:m...@timgolden.me.uk; 
target=_blankm...@timgolden.me.uk/agt; added the comment:br
br
Boštjan, the code segment you quote is the *fallback* if thebr
C module hasn#39;t been built for some reason. The module simplybr
calls through to the underlying C Library. I notice you#39;rebr
running on Windows, so this is a useful MS page:br
br
a href=http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx; 
target=_blankhttp://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx/abr
br
and you can see there that a call of setlocale (LC_ALL, quot;Englishquot;)br
is valid (of quot;Frenchquot; if you prefer):br
br
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bitbr
(Intel)] on win32br
Type quot;helpquot;, quot;copyrightquot;, quot;creditsquot; or 
quot;licensequot; for more information.br
gt;gt;gt; import localebr
gt;gt;gt; locale.setlocale (locale.LC_ALL, quot;Frenchquot;)br
#39;French_France.1252#39;br
gt;gt;gt;br
br
--br
nosy: +tim.goldenbr
divdiv/divdivbr
___br
Python tracker lt;a href=mailto:rep...@bugs.python.org; 
target=_blankrep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue10092; 
target=_blankhttp://bugs.python.org/issue10092/agt;br
___br
/div/div/blockquote/divbr
/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-20 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com added the comment:

Please respond...

On Wed, Oct 20, 2010 at 7:05 PM, Boštjan Mejak rep...@bugs.python.orgwrote:


 Boštjan Mejak bostjan.me...@gmail.com 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 float to just one decimal place. I
 know
 that the 'f' format specifier does that by specifying .1f, but 'f' is not
 locale-aware. I have set the 'n' format specifier in my application like
 .3n, which is okay if the returned number is two integers and one
 decimal,
 but is not okay if the returned number is one integer and two decimals,
 because I want just one decimal, always. How can I make that by using the
 'n' format specifier?

 On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden rep...@bugs.python.org
 wrote:

 
  Tim Golden m...@timgolden.me.uk 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/library/x99tb11d%28VS.71%29.aspx
 
  and you can see there that a call of setlocale (LC_ALL, English)
  is valid (of French if you prefer):
 
  Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
  (Intel)] on win32
  Type help, copyright, credits or license for more information.
   import locale
   locale.setlocale (locale.LC_ALL, French)
  'French_France.1252'
  
 
  --
  nosy: +tim.golden
 
  ___
  Python tracker rep...@bugs.python.org
  http://bugs.python.org/issue10092
  ___
 

 --
 Added file: http://bugs.python.org/file19306/unnamed

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue10092
 ___


--
Added file: http://bugs.python.org/file19316/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___Please respond...brbrdiv class=gmail_quoteOn Wed, Oct 20, 2010 at 7:05 
PM, Boštjan Mejak span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brblockquote class=gmail_quote style=margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;
br
Boštjan Mejak lt;a 
href=mailto:bostjan.me...@gmail.com;bostjan.me...@gmail.com/agt; added the 
comment:br
div class=imbr
Thank you so much for your answer. Thebr
locale.setlocale(category=locale.LC_NUMERIC,br
locale=quot;Slovenianquot;)  works like a charm in my application. Now the 
#39;n#39;br
format specifier works as I want. But tell me whether the #39;n#39; formatbr
specifier can be forced to round the float to just one decimal place. I knowbr
that the #39;f#39; format specifier does that by specifying quot;.1fquot;, 
but #39;f#39; is notbr
locale-aware. I have set the #39;n#39; format specifier in my application 
likebr
quot;.3nquot;, which is okay if the returned number is two integers and one 
decimal,br
but is not okay if the returned number is one integer and two decimals,br
because I want just one decimal, always. How can I make that by using thebr
#39;n#39; format specifier?br
br
On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt; wrote:br
br
gt;br
/divdiv class=imgt; Tim Golden lt;a 
href=mailto:m...@timgolden.me.uk;m...@timgolden.me.uk/agt; added the 
comment:br
gt;br
/divgt; Boštjan, the code segment you quote is the *fallback* if thebr
divdiv/divdiv class=h5gt; C module hasn#39;t been built for some 
reason. The module simplybr
gt; calls through to the underlying C Library. I notice you#39;rebr
gt; running on Windows, so this is a useful MS page:br
gt;br
gt; a href=http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx; 
target=_blankhttp://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx/abr
gt;br
gt; and you can see there that a call of setlocale (LC_ALL, 
quot;Englishquot;)br
gt; is valid (of quot;Frenchquot; if you prefer):br
gt;br
gt; Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bitbr
gt; (Intel)] on win32br
gt; Type quot;helpquot;, quot;copyrightquot;, quot;creditsquot; or 
quot;licensequot; for more information.br
gt; gt;gt;gt; import localebr
gt; gt;gt;gt; locale.setlocale (locale.LC_ALL, quot;Frenchquot;)br
gt; #39;French_France.1252#39;br
gt; gt;gt;gt;br
gt;br
gt; --br
gt; nosy: +tim.goldenbr
gt;br
gt; ___br
gt; Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
gt; lt;a 

[issue10092] calendar does not restore locale properly

2010-10-20 Thread R. David Murray

R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-19 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-19 Thread Éric Araujo

Éric Araujo mer...@netwok.org 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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-19 Thread Boštjan Mejak

Boštjan Mejak bostjan.me...@gmail.com 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 rep...@bugs.python.org wrote:


 Éric Araujo mer...@netwok.org 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

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue10092
 ___


--
Added file: http://bugs.python.org/file19286/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___blockquote class=gmail_quote style=margin-top: 0px; margin-right: 0px; 
margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; 
border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 
1ex; 
span class=Apple-style-span style=font-family: arial, sans-serif; 
font-size: 13px; border-collapse: collapse; Would you like to try to make a 
patch for Python 3.2?/span/blockquotedivI#39;m not that geeky. 
:) /div
brdiv class=gmail_quoteOn Tue, Oct 19, 2010 at 8:36 PM, Éric Araujo 
span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brblockquote class=gmail_quote style=margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;
br
Éric Araujo lt;a href=mailto:mer...@netwok.org;mer...@netwok.org/agt; 
added the comment:br
br
Indeed.  Would you like to try to make a patch for Python 3.2?  Help is 
here: a href=http://www.python.org/dev/; 
target=_blankhttp://www.python.org/dev//a (especially a 
href=http://www.python.org/dev/patches/; 
target=_blankhttp://www.python.org/dev/patches//a ) and here: a 
href=http://docs.pythonsprints.com/core_development/beginners.html; 
target=_blankhttp://docs.pythonsprints.com/core_development/beginners.html/abr

br
--br
divdiv/divdiv class=h5br
___br
Python tracker lt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br
lt;a href=http://bugs.python.org/issue10092; 
target=_blankhttp://bugs.python.org/issue10092/agt;br
___br
/div/div/blockquote/divbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-19 Thread Georg Brandl

Georg Brandl ge...@python.org 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 - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-17 Thread JJeffries

Changes by JJeffries jamesjeffri...@gmail.com:


--
nosy: +JJeffries

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

 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'

--
messages: 118570
nosy: belopolsky
priority: normal
severity: normal
stage: unit test needed
status: open
title: calendar does not restore locale properly

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +christian.heimes, georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10092] calendar does not restore locale properly

2010-10-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +twouters

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10092
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com