Re: [Python-Dev] Py_BuildValue and decref

2006-09-11 Thread Mihai Ibanescu
On Sun, Sep 10, 2006 at 07:35:59PM +1200, Greg Ewing wrote: > Barry Warsaw wrote: > > I just want to point out that the C API documentation is pretty > > silent about the refcounting side-effects in error conditions (and > > often in success conditions too) of most Python functions. For > >

Re: [Python-Dev] Py_BuildValue and decref

2006-09-08 Thread Mihai Ibanescu
On Fri, Sep 08, 2006 at 06:27:08PM -0400, Barry Warsaw wrote: > > On Sep 8, 2006, at 6:06 PM, Mihai Ibanescu wrote: > > >There is no description of what happens when Py_BuildValue fails. > >Will it > >decref the python object passed in? Will it not? > > I just

[Python-Dev] Py_BuildValue and decref

2006-09-08 Thread Mihai Ibanescu
Hi, Looking at: http://docs.python.org/api/arg-parsing.html The description for "O" is: "O" (object) [PyObject *] Store a Python object (without any conversion) in a C object pointer. The C program thus receives the actual object that was passed. The object's reference count is not

Re: [Python-Dev] logging module broken because of locale

2006-07-20 Thread Mihai Ibanescu
On Thu, Jul 20, 2006 at 06:08:05PM +0200, "Martin v. Löwis" wrote: > Mihai Ibanescu wrote: > > It's up to Vinay to decide if we want to drop support for 1.5.2 in the > > module > > included in newer pythons, or the attached patch would make it work for > &g

Re: [Python-Dev] logging module broken because of locale

2006-07-20 Thread Mihai Ibanescu
On Thu, Jul 20, 2006 at 05:09:38AM -0500, [EMAIL PROTECTED] wrote: > > Misa> Good point. Does the attached patch look reasonable? > > ... > Misa> -self.when = string.upper(when) > Misa> +self.when = unicode(when).upper() > ... > > The use of the string module

Re: [Python-Dev] logging module broken because of locale

2006-07-19 Thread Mihai Ibanescu
On Tue, Jul 18, 2006 at 02:55:56PM -0400, Fred L. Drake, Jr. wrote: > On Tuesday 18 July 2006 14:52, Mihai Ibanescu wrote: > > Unicode might be a perfectly acceptable suggestion for others too. > > Are we still supporting builds that don't include Unicode? If so, that needs

Re: [Python-Dev] logging module broken because of locale

2006-07-18 Thread Mihai Ibanescu
On Tue, Jul 18, 2006 at 07:54:28PM +0200, "Martin v. Löwis" wrote: > Mihai Ibanescu wrote: > > To follow up on my own email: it looks like, even though in some locale > > "INFO".lower() != "info" > > > > u"INFO".lower() == "

Re: [Python-Dev] logging module broken because of locale

2006-07-18 Thread Mihai Ibanescu
On Tue, Jul 18, 2006 at 10:53:23AM -0700, Guido van Rossum wrote: > And u"info".upper()? Yepp, that shows the right thing (at least in the several locales I tested, Turkish included). It's along the lines of u"INFO".lower() I was proposing in my second post :-) Misa _

Re: [Python-Dev] logging module broken because of locale

2006-07-18 Thread Mihai Ibanescu
On Tue, Jul 18, 2006 at 10:19:54AM -0700, Guido van Rossum wrote: > Alternatively, does "info".upper() == "INFO" everywhere? Not in the Turkish locale :-( # begin /tmp/foo.py import locale locale.setlocale(locale.LC_ALL, '') print "info".upper() print "info".upper() == "INFO" # end /tmp/foo.py

Re: [Python-Dev] logging module broken because of locale

2006-07-18 Thread Mihai Ibanescu
On Mon, Jul 17, 2006 at 03:39:55PM -0400, Mihai Ibanescu wrote: > Hi, > > This is reported on sourceforge: > > http://sourceforge.net/tracker/index.php?func=detail&aid=1524081&group_id=5470&atid=105470 > > I am willing to try and patch the problem, but I&#

[Python-Dev] logging module broken because of locale

2006-07-17 Thread Mihai Ibanescu
Hi, This is reported on sourceforge: http://sourceforge.net/tracker/index.php?func=detail&aid=1524081&group_id=5470&atid=105470 I am willing to try and patch the problem, but I'd like to discuss my ideas first. The basic problem is that, in some locale, "INFO".lower() != "info". So, initializin