Re: [Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-06-06 Thread Bruce Leban
It seems somewhat illogical to require [#][sign] in that order when the parts inserted by them go in the opposite order. So if a specific order is required, then I think it should be reversed. '=' padding goes in the wrong order too: perhaps -#0=20d makes more sense than 0=-#20d. I don't find tha

Re: [Python-3000] TextIOWrapper.read() "fixed"?

2008-06-06 Thread Humberto Diogenes
On 06/06/2008, at 15:14, Guido van Rossum wrote: On Fri, Jun 6, 2008 at 3:02 AM, Humberto Diogenes <[EMAIL PROTECTED] > wrote: Is that still necessary? I can't tell for sure what Barry meant, but this was introduced in August 2007. Since then, a lot has changed in io.py. Why don't you try t

Re: [Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-06-06 Thread Eric Smith
Nick Coghlan wrote: Doing the right thing for negative numbers is a good point. It also means the prefix can be handled properly when dealing with aligned fields. The following update to the standard format specifier in the PEP: [[fill]align][#][sign][0][minimumwidth][.precision][type] Th

Re: [Python-3000] Single buffer implied in new buffer protocol?

2008-06-06 Thread Travis Oliphant
Stefan Behnel wrote: Stefan Behnel wrote: So that means it's fine to remove all locking related functionality from the new buffer protocol and leave everything to application space, right? Here is a patch for the PEP that reflects this. I filed this as bug #3046. http://bugs.python.org/issue

Re: [Python-3000] TextIOWrapper.read() "fixed"?

2008-06-06 Thread Guido van Rossum
On Fri, Jun 6, 2008 at 3:02 AM, Humberto Diogenes <[EMAIL PROTECTED]> wrote: > > I found this on Lib/email/parser.py, on Parser.parse(): > >while True: >data = fp.read(8192) >if not data: >break ># XXX When Guido fixes TextIOWrapper.read(

Re: [Python-3000] .transform() / .untransform()

2008-06-06 Thread M.-A. Lemburg
On 2008-05-09 12:54, M.-A. Lemburg wrote: On 2008-05-08 22:55, Terry Reedy wrote: Functions that map unicode->unicode or bytes->bytes could be called transcoders. Each type could be given a .transcode method to go along with but contrast with .encode or .decode. Are you suggesting to have tw

Re: [Python-3000] Persistent Error

2008-06-06 Thread Amaury Forgeot d'Arc
Anand Balachandran Pillai wrote: > Hi Amaury, > > This is the entry for _warnings. > > /* This lives in _warnings.c */ >{"_warnings", _PyWarnings_Init}, Did you find this in Modules/config.c? > Btw, you said _warnings is not designed to be a .so module. So what type of > module is _warnin

Re: [Python-3000] Persistent Error

2008-06-06 Thread Anand Balachandran Pillai
Hi Amaury, This is the entry for _warnings. /* This lives in _warnings.c */ {"_warnings", _PyWarnings_Init}, Btw, you said _warnings is not designed to be a .so module. So what type of module is _warnings ? Thanks --Anand On Fri, Jun 6, 2008 at 3:25 PM, Amaury Forgeot d'Arc <[EMAIL P

[Python-3000] TextIOWrapper.read() "fixed"?

2008-06-06 Thread Humberto Diogenes
I found this on Lib/email/parser.py, on Parser.parse(): while True: data = fp.read(8192) if not data: break # XXX When Guido fixes TextIOWrapper.read() to act just like # .readlines(), this... feedparser.fee

Re: [Python-3000] Persistent Error

2008-06-06 Thread Amaury Forgeot d'Arc
Anand Balachandran Pillai wrote: > Hi Stefan, > > There are no build errors in the warnings module and _warnings.o is > generated. > However I looked at the make log and no _warnings.so is built by the > linker. Instead > _warnings.o is just archived into libpython3.0a. ... Yes, _warnings is not

Re: [Python-3000] Persistent Error

2008-06-06 Thread Anand Balachandran Pillai
Hi Stefan, There are no build errors in the warnings module and _warnings.o is generated. However I looked at the make log and no _warnings.so is built by the linker. Instead _warnings.o is just archived into libpython3.0a. Cannot find any error in config.log either. I tried to check how _warn

Re: [Python-3000] [Python-Dev] Stabilizing the C API of 2.6 and 3.0

2008-06-06 Thread M.-A. Lemburg
On 2008-06-03 01:29, Gregory P. Smith wrote: On Mon, Jun 2, 2008 at 4:09 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: I will freely admit that I haven't followed this thread in any detail, but if it were up to me, I'd have the 2.6 internal code use PyString ... Should we read this as a BD

Re: [Python-3000] Persistent Error

2008-06-06 Thread Georg Brandl
Amaury Forgeot d'Arc schrieb: It seems that there are two problems here: - First, there is a bug in the sys.flags structure: revision 62322 added a new flag in the underlying C structure, but did not increase the number of fields visible from python code. This should be corrected: in sysmodules.

Re: [Python-3000] Persistent Error

2008-06-06 Thread Stefan Behnel
Anand Balachandran Pillai wrote: > After commenting out the code which catches the ImportError, > this is the trace. > > [EMAIL PROTECTED] ~]$ python3 > Fatal Python error: Py_Initialize: can't initialize sys standard streams > Traceback (most recent call last): > File "/usr/local/lib/python3.0/

Re: [Python-3000] Persistent Error

2008-06-06 Thread Anand Balachandran Pillai
Hi Amaury, After commenting out the code which catches the ImportError, this is the trace. [EMAIL PROTECTED] ~]$ python3 Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "/usr/local/lib/python3.0/io.py", line 63, in import war

Re: [Python-3000] Persistent Error

2008-06-06 Thread Amaury Forgeot d'Arc
Hello, Anand Balachandran Pillai wrote: > Hi, > >I have been getting the following persistent error with Python 3.0 > since an April 15 update of the subversion trunk (svn version 62349) > > I am running Fedora Core 6, with kernel 2.6.22.7-57.fc6 on > an Intel i686 SMP box. Python was compile

[Python-3000] Persistent Error

2008-06-06 Thread Anand Balachandran Pillai
Hi, I have been getting the following persistent error with Python 3.0 since an April 15 update of the subversion trunk (svn version 62349) I am running Fedora Core 6, with kernel 2.6.22.7-57.fc6 on an Intel i686 SMP box. Python was compiled with gcc version 4.1.2 (Redhat - 4.1.2-13). Python