Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Neal Norwitz
On 1/8/06, Martin v. Löwis [EMAIL PROTECTED] wrote: Neal Norwitz wrote: I know very little about locale's. /f assigned me a bug http://python.org/sf/1391872 which suggests I run all the tests in a different locale than C. I think this is a good idea, but when I set LANG or LC_ALL or

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Fredrik Lundh
Neal Norwitz wrote: I feel I'm lacking some link here: why do you think we should do that? [EMAIL PROTECTED] ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python import locale locale.setlocale(locale.LC_ALL) 'C' locale.setlocale(locale.LC_ALL, 'de_DE') 'de_DE' I would have expected

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Neal Norwitz
On 1/8/06, Martin v. Löwis [EMAIL PROTECTED] wrote: Georg Brandl wrote: import locale locale.setlocale(locale.LC_NUMERIC, ) '[EMAIL PROTECTED]' u%f % 1.0 u'1,00' Is this intended? This breaks test_format on my box when test_builtin (method test_float_with_comma) is

Re: [Python-Dev] test_curses

2006-01-09 Thread Michael Hudson
Georg Brandl [EMAIL PROTECTED] writes: The call to curses.setupterm() leaves my terminal in a bad state. Hmm. The reset program outputs: Erase set to delete. Kill set to control-U (^U). Interrupt set to control-C (^C). It always says that :) (unless you've messed with stty, I guess)

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Benji York
Fredrik Lundh wrote: my rationale for running the tests with a non-US locale was to increase the chance of catching bugs where the external locale setting affects Python's behaviour. maybe it would be a good idea to add a use setlocale flag to the test- runner ? Sounds like a good use for

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/7, Guido van Rossum [EMAIL PROTECTED]: I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Fred L. Drake, Jr.
On Monday 09 January 2006 12:08, Facundo Batista wrote: What I wanted to add to the module was predicatibility: a very needed feature when you're writing test cases (and that's where I got bite). In that case, would sorting the keys within each section be sufficient when writing it back out?

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-09 Thread Tim Peters
... [Tim] That's no more or less painful than using C99's huge pile of PRId8, PRId16, PRId32 (etc, etc) macros, defined there for similar purposes. [Martin] Right - and I consider them just as painful. If you believe that this is really what we should be doing, then, well, let's do it. I

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-09 Thread Tim Peters
[Tim] We could use the I (capital letter eye) length modifier under VC7.1. That's good for both size_t and ptrdiff_t formats under VC7.1, where ptrdiff_t under VC7.1 is really the same concept as Py_ssize_t. [Martin] ptrdiff_t has the advantage of being available on all platforms, being

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-09 Thread Neal Norwitz
On 1/9/06, Tim Peters [EMAIL PROTECTED] wrote: ... [Tim] That's no more or less painful than using C99's huge pile of PRId8, PRId16, PRId32 (etc, etc) macros, defined there for similar purposes. [Martin] Right - and I consider them just as painful. If you believe that this is really

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Georg Brandl
Martin v. Löwis wrote: Georg Brandl wrote: import locale locale.setlocale(locale.LC_NUMERIC, ) '[EMAIL PROTECTED]' %f % 1.0 '1.00' u%f % 1.0 u'1,00' Is this intended? This breaks test_format on my box when test_builtin (method test_float_with_comma) is executed

Re: [Python-Dev] test_curses

2006-01-09 Thread Georg Brandl
Michael Hudson wrote: Georg Brandl [EMAIL PROTECTED] writes: The call to curses.setupterm() leaves my terminal in a bad state. Hmm. The reset program outputs: Erase set to delete. Kill set to control-U (^U). Interrupt set to control-C (^C). It always says that :) (unless you've

[Python-Dev] Logging enhancements

2006-01-09 Thread Shane Hathaway
I'd like to create a patch for the logging package, but before I do, I need to know whether someone else is working on the package and whether my patch is likely to be accepted. Is there another group I should talk to? Specifically, I want to change the following: - The

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Martin v. Löwis
Neal Norwitz wrote: [EMAIL PROTECTED] ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python import locale locale.setlocale(locale.LC_ALL) 'C' locale.setlocale(locale.LC_ALL, 'de_DE') 'de_DE' I would have expected the first call to setlocale() to return de_DE. No, it shouldn't. We

Re: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

2006-01-09 Thread Martin v. Löwis
Neal Norwitz wrote: I often chose to use Py_ssize_t rather than int if it was capturing the result of a sequence length. But often this is larger than what will be allowed (like in this case). The problem then comes that we have cases everywhere if we leave things as ints. This is also the

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Martin v. Löwis
Georg Brandl wrote: import locale orig_locale = locale.setlocale(locale.LC_NUMERIC, '') locale.setlocale(locale.LC_NUMERIC, 'fr_FR') and later finally: locale.setlocale(locale.LC_NUMERIC, orig_locale) Shouldn't the first

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Neal Norwitz
On 1/9/06, Shane Hathaway [EMAIL PROTECTED] wrote: I'd like to create a patch for the logging package, but before I do, I need to know whether someone else is working on the package and whether my patch is likely to be accepted. Is there another group I should talk to? Vinay (copied)

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/9, Fred L. Drake, Jr. [EMAIL PROTECTED]: On Monday 09 January 2006 12:08, Facundo Batista wrote: What I wanted to add to the module was predicatibility: a very needed feature when you're writing test cases (and that's where I got bite). In that case, would sorting the keys within

Re: [Python-Dev] locale and LC_NUMERIC

2006-01-09 Thread Neal Norwitz
On 1/9/06, Martin v. Löwis [EMAIL PROTECTED] wrote: I would have expected the first call to setlocale() to return de_DE. No, it shouldn't. We are providing C semantics here, which is that no locale functionality is activated unless the application explicitly asks for it. Thanks (to /f

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Shane Hathaway
Neal Norwitz wrote: On 1/9/06, Shane Hathaway [EMAIL PROTECTED] wrote: I'd like to create a patch for the logging package, but before I do, I need to know whether someone else is working on the package and whether my patch is likely to be accepted. Is there another group I should talk to?

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Aahz
On Mon, Jan 09, 2006, Shane Hathaway wrote: What is the time frame for Python 2.5? If I finish soon and the changes are not disruptive, do I have enough time for my changes to make it into 2.5? There is still no official timeframe for 2.5. Alpha is hoped for March/April; final release for

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Tim Peters
[Shane Hathaway] What is the time frame for Python 2.5? If I finish soon and the changes are not disruptive, do I have enough time for my changes to make it into 2.5? Yup! 2.5 hasn't even had an alpha release yet, and I don't expect 2.5a1 before March:

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Shane Hathaway
Tim Peters wrote: [Shane Hathaway] What is the time frame for Python 2.5? If I finish soon and the changes are not disruptive, do I have enough time for my changes to make it into 2.5? Yup! 2.5 hasn't even had an alpha release yet, and I don't expect 2.5a1 before March:

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Vinay Sajip
Hi Shane, On 1/9/06, Shane Hathaway [EMAIL PROTECTED] wrote: I'd like to create a patch for the logging package, but before I do, I need to know whether someone else is working on the package and whether my patch is likely to be accepted. Is there another group I should talk to? I maintain

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Shane Hathaway
Vinay Sajip wrote: On 1/9/06, Shane Hathaway [EMAIL PROTECTED] wrote: - The logging.config.fileConfig function has bare excepts that hide configuration errors. I'd like to remove the bare excepts and break up fileConfig for clarity. I've no problem with this in principle, though there have

Re: [Python-Dev] Logging enhancements

2006-01-09 Thread Barry Warsaw
On Tue, 2006-01-10 at 00:01 +, Vinay Sajip wrote: I maintain the logging package, and I will happily review patches and apply them where I think they're fine. I have accepted many patches to the package, some via SF and some sent privately, but also rejected a few. For example, the