Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread Talin
A.M. Kuchling wrote: > On Tue, May 30, 2006 at 03:36:02PM -0600, Steven Bethard wrote: > >>That sounds about reasonable. One possible grouping: > > > Note that 2.5's library reference has a different chapter organization > from 2.4's. See . I like it.

Re: [Python-Dev] optparse and unicode

2006-05-30 Thread Ronald Oussoren
On 30-mei-2006, at 22:32, Tom Cato Amundsen wrote: > optparse > > > Using unicode strings with non-ascii chars.[1] > > I'm working around this by subclassing OptionParser. Below is a > workaround I use in GNU Solfege. Should something like this be > included in python 2.5? Could you ple

Re: [Python-Dev] Segmentation fault of Python if build on Solaris 9 or 10 with Sun Studio 11

2006-05-30 Thread Guido van Rossum
On 5/30/06, Andreas Flöter <[EMAIL PROTECTED]> wrote: > I have filed a bug report "Building Python 2.4.3 on Solaris 9/10 with Sun > Studio 11" 1496561 in the Python tracker. The problem I have encountered is, > that some of the unit tests of the application roundup fail with Python > producing a se

Re: [Python-Dev] Socket module corner cases

2006-05-30 Thread Andrew McNamara
>After a little more investigation here, it appears that getfqdn() returns >the name unchanged (or perhaps run through the system's resolver libs) if >there's no reverse DNS PTR entry. In the case given above, >otherbox.mydomain.com didn't have a reverse DNS entry, so getfqdn() >returned 'OTHERBOX'

[Python-Dev] optparse and unicode

2006-05-30 Thread Tom Cato Amundsen
optparse Using unicode strings with non-ascii chars.[1] I'm working around this by subclassing OptionParser. Below is a workaround I use in GNU Solfege. Should something like this be included in python 2.5? (Please CC me any answer.) Tom Cato --- orig/src/mainwin.py +++ mod/src/mainwi

[Python-Dev] Segmentation fault of Python if build on Solaris 9 or 10 with Sun Studio 11

2006-05-30 Thread Andreas Flöter
I have filed a bug report "Building Python 2.4.3 on Solaris 9/10 with Sun Studio 11" 1496561 in the Python tracker. The problem I have encountered is, that some of the unit tests of the application roundup fail with Python producing a segmentation fault and dumping core, if Python was build with

Re: [Python-Dev] 2.5a2 try/except slow-down: Convert to type?

2006-05-30 Thread Sean Reifschneider
Changes have been checked into the trunk for converting exceptions to types instead of classes. According to pybench, 2.5a2 was 60% slower at raising exceptions than 2.4.3, and now trunk is 30% faster than 2.4.3. Yay! Thanks, Sean -- "I was on IRC once and got mistaken for Dan Bernstein. I stil

Re: [Python-Dev] Need for Speed Sprint status

2006-05-30 Thread Sean Reifschneider
On Fri, May 26, 2006 at 09:51:55PM -0700, Neal Norwitz wrote: >I just hope to hell you're done, because I can't keep up! :-) Yeah, sucks to be you. :-) >It would help me enormously if someone could summarize the status and >everything that went on. These are the things that would help me the >m

Re: [Python-Dev] Socket module corner cases

2006-05-30 Thread Bruce Christensen
> > * getfqdn(): The function seems to not always return the FQDN. For > >example, if I run the following code from 'mybox.mydomain.com', I get > >strange output. Does getfqdn() remove the common domain between my > >hostname and the one that I'm looking up? > socket.getfqdn('otherbox') > >

Re: [Python-Dev] Let's stop eating exceptions in dict lookup

2006-05-30 Thread Martin Blais
On 5/29/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > If it is really 0.5%, then we're fine. Just remember that PyStone is an > amazingly uninformative and crappy benchmark. I'm still looking for a benchmark that is not amazingly uninformative and crappy. I've been looking around all day

Re: [Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread Tim Peters
[Bob Ippolito] > It seems that we should convert the crc32 functions in binascii, > zlib, etc. to deal with unsigned integers. Currently it seems that 32- > bit and 64-bit platforms are going to have different results for > these functions. binascii.crc32 very deliberately intends to return the sa

Re: [Python-Dev] Socket module corner cases

2006-05-30 Thread Andrew McNamara
>Without further ado, the questions: > > * getfqdn(): The module docs specify that if no FQDN can be found, >socket.getfqdn() should return the hostname as returned by >gethostname(). However, CPython seems to return the passed-in hostname >rather than the local machine's hostname (as would be expe

Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread Brett Cannon
On 5/30/06, A.M. Kuchling <[EMAIL PROTECTED]> wrote: On Tue, May 30, 2006 at 03:36:02PM -0600, Steven Bethard wrote:> That sounds about reasonable.  One possible grouping:Note that 2.5's library reference has a different chapter organizationfrom 2.4's.  See < http://docs.python.org/dev/lib/lib.html

Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread A.M. Kuchling
On Tue, May 30, 2006 at 03:36:02PM -0600, Steven Bethard wrote: > That sounds about reasonable. One possible grouping: Note that 2.5's library reference has a different chapter organization from 2.4's. See . --amk

Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread Brett Cannon
On 5/30/06, Steven Bethard <[EMAIL PROTECTED]> wrote: [Steven Bethard]> I think that having a package level that exactly matches the divisions> in the Library Reference (http://docs.python.org/lib/lib.html) would > be great.[Brett Cannon]> Makes sense to me.>[snip]> > 5. Miscellaneous Services>> I

Re: [Python-Dev] fixing buildbots

2006-05-30 Thread martin
Zitat von Neal Norwitz <[EMAIL PROTECTED]>: > I've been starting to get some of the buildbots working again. There > was some massive problem on May 25 where a ton of extra files were > left around. I can't remember if I saw something about that at the > NFS sprint or not. You can clean each bu

[Python-Dev] uriparsing library (Patch #1462525)

2006-05-30 Thread Paul Jimenez
http://sourceforge.net/tracker/index.php?func=detail&aid=1462525&group_id=5470&atid=305470 This is just a note to ask when the best time to try and get this in is - I've seen other new/changed libs going in for 2.5 and wanted to make sure this didn't fall off the radar. If now's the wrong time,

Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread Steven Bethard
[Steven Bethard] > I think that having a package level that exactly matches the divisions > in the Library Reference (http://docs.python.org/lib/lib.html) would > be great. [Brett Cannon] > Makes sense to me. > [snip] > > 5. Miscellaneous Services > > I don't think we necessarily want a misc packa

Re: [Python-Dev] fixing buildbots

2006-05-30 Thread martin
Zitat von Benji York <[EMAIL PROTECTED]>: > FWIW, with the buildbots I run, I use "clobber" mode, with which the > entire build directory is removed and rebuilt on each run. It slows > things down a bit, but the results have been more consistent and it's > easier to administer. We should not do

[Python-Dev] Socket module corner cases

2006-05-30 Thread Bruce Christensen
Hello, I'm working on implementing a socket module for IronPython that aims to be compatible with the standard CPython module documented at http://docs.python.org/lib/module-socket.html. I have a few questions about some corner cases that I've found. CPython results below are from Python 2.4.3 (#6

Re: [Python-Dev] bug in PEP 318

2006-05-30 Thread Phillip J. Eby
At 08:56 PM 5/30/2006 +0200, Alexander Bernauer wrote: >Hi > >I found two bugs in example 4 of the PEP 318 [1]. People on #python >pointed me to this list. So here is my report. Additionally I appended >an afaics correct implementation for this task. > >[1] http://www.python.org/dev/peps/pep-0318/

Re: [Python-Dev] [Python-3000] stdlib reorganization

2006-05-30 Thread Brett Cannon
On 5/30/06, Steven Bethard < [EMAIL PROTECTED]> wrote: On 5/30/06, Brett Cannon <[EMAIL PROTECTED]> wrote:> So, first step in my mind is settling if we want to add one more depth to > the stdlib, and if so, how we want to group (not specific groupings, just > general guidelines).I think that having

[Python-Dev] bug in PEP 318

2006-05-30 Thread Alexander Bernauer
Hi I found two bugs in example 4 of the PEP 318 [1]. People on #python pointed me to this list. So here is my report. Additionally I appended an afaics correct implementation for this task. [1] http://www.python.org/dev/peps/pep-0318/ Bug 1) The decorator "accepts" gets the function which is ret

Re: [Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread Bob Ippolito
On May 30, 2006, at 11:19 AM, Guido van Rossum wrote: > On 5/30/06, Giovanni Bajo <[EMAIL PROTECTED]> wrote: >> Bob Ippolito wrote: >> >> > It seems that we should convert the crc32 functions in binascii, >> > zlib, etc. to deal with unsigned integers. >> >> +1!! > > Seems ok, except I don't know

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Fredrik Lundh
Georg Brandl wrote: >> and links to >> >> http://msdn2.microsoft.com/en-us/library/c8xdzzhh.aspx >> >> which provides a pragma that does the same thing, and is documented to work >> for both C and C++, and also works for macros. > > But we'd have to use an #ifdef for every deprecated function

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Georg Brandl
Fredrik Lundh wrote: > Georg Brandl wrote: > >> > I'd be satisfied with a deprecation warning for PyArg_Parse, though we >> > (*) should really figure out how to make it work on Windows. I >> > haven't seen anyone object to the C compiler deprecation warning. >> >> There is something at >> http:/

Re: [Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread Guido van Rossum
Seems ok, except I don't know what the backwards incompatibilities would be... On 5/30/06, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > Bob Ippolito wrote: > > > It seems that we should convert the crc32 functions in binascii, > > zlib, etc. to deal with unsigned integers. > > +1!! -- --Guido van

Re: [Python-Dev] fixing buildbots

2006-05-30 Thread Neal Norwitz
On 5/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Neal Norwitz wrote: > > > I've been starting to get some of the buildbots working again. There > > was some massive problem on May 25 where a ton of extra files were > > left around. I can't remember if I saw something about that at the > > N

Re: [Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread Giovanni Bajo
Bob Ippolito wrote: > It seems that we should convert the crc32 functions in binascii, > zlib, etc. to deal with unsigned integers. +1!! -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-Dev] test_gzip/test_tarfile failure om AMD64

2006-05-30 Thread Bob Ippolito
On May 30, 2006, at 10:47 AM, Tim Peters wrote: > [Bob Ippolito] >> What should it be called instead of wrapping? > > I don't know -- I don't know what it's trying to _say_ that isn't > already said by saying that the input is out of bounds for the format > code. The wrapping (now overflow maski

Re: [Python-Dev] Let's stop eating exceptions in dict lookup

2006-05-30 Thread Josiah Carlson
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Tim Peters wrote: > > "abc".count("", 100) > > 1 > u"abc".count("", 100) > > 1 > > which is the same as > > >>> "abc"[100:].count("") > 1 > > "abc".find("", 100) > > 100 > u"abc".find("", 100) > > 100 > > > > today, although the

Re: [Python-Dev] test_gzip/test_tarfile failure om AMD64

2006-05-30 Thread Tim Peters
[Bob Ippolito] > What should it be called instead of wrapping? I don't know -- I don't know what it's trying to _say_ that isn't already said by saying that the input is out of bounds for the format code. > When it says it's wrapping, it means that it's doing x &= (2 ^ (8 * n)) - 1 > to force >

[Python-Dev] Converting crc32 functions to use unsigned

2006-05-30 Thread Bob Ippolito
It seems that we should convert the crc32 functions in binascii, zlib, etc. to deal with unsigned integers. Currently it seems that 32- bit and 64-bit platforms are going to have different results for these functions. Should we do the same as the struct module, and do DeprecationWarning whe

Re: [Python-Dev] test_gzip/test_tarfile failure om AMD64

2006-05-30 Thread Bob Ippolito
On May 30, 2006, at 2:41 AM, Nick Coghlan wrote: > Bob Ippolito wrote: >> On May 29, 2006, at 8:00 PM, Tim Peters wrote: >>> We certainly don't want to see two deprecation warnings for a single >>> deprecated behavior. I suggest eliminating the "struct integer >>> wrapping" warning, mostly becaus

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Scott Dial
Neal Norwitz wrote: > Already done for gcc, see Py_DEPRECATED in pyport.h. Would be nice if > someone could add support on Windows. > The manner that macro is used can't be leveraged to work in the VC compiler. I admit to not having done an extensive search for the usage of Py_DEPRECATED, but

Re: [Python-Dev] fixing buildbots

2006-05-30 Thread Benji York
Neal Norwitz wrote: > I can > understand why we wouldn't want to unconditionally overwrite a user's > modified Setup. However, for the buildbots, it seems safer to always > overwrite it. FWIW, with the buildbots I run, I use "clobber" mode, with which the entire build directory is removed and

Re: [Python-Dev] Integer representation (Was: ssize_t question: longs in header files)

2006-05-30 Thread Fredrik Lundh
Martin v. Löwis wrote: >> That's why I'd like my alternative proposal (int as ABC and two >> subclasses that may remain anonymous to the Python user); it'll save >> the alignment waste for short ints and will let us use a smaller int >> type for the size for long ints (if we care about the latter)

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Fredrik Lundh
Georg Brandl wrote: > > I'd be satisfied with a deprecation warning for PyArg_Parse, though we > > (*) should really figure out how to make it work on Windows. I > > haven't seen anyone object to the C compiler deprecation warning. > > There is something at > http://msdn2.microsoft.com/en-us/libr

Re: [Python-Dev] fixing buildbots

2006-05-30 Thread Fredrik Lundh
Neal Norwitz wrote: > I've been starting to get some of the buildbots working again. There > was some massive problem on May 25 where a ton of extra files were > left around. I can't remember if I saw something about that at the > NFS sprint or not. bob's new _struct module was checked in on Ma

Re: [Python-Dev] Let's stop eating exceptions in dict lookup

2006-05-30 Thread Fredrik Lundh
Tim Peters wrote: "abc".count("", 100) > 1 u"abc".count("", 100) > 1 which is the same as >>> "abc"[100:].count("") 1 "abc".find("", 100) > 100 u"abc".find("", 100) > 100 > > today, although the idea that find() can return an index that doesn't > exist in the string is parti

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Paul Moore
On 5/30/06, Georg Brandl <[EMAIL PROTECTED]> wrote: > Neal Norwitz wrote: > > I'd be satisfied with a deprecation warning for PyArg_Parse, though we > > (*) should really figure out how to make it work on Windows. I > > haven't seen anyone object to the C compiler deprecation warning. > > There is

Re: [Python-Dev] test_gzip/test_tarfile failure om AMD64

2006-05-30 Thread Nick Coghlan
Bob Ippolito wrote: > On May 29, 2006, at 8:00 PM, Tim Peters wrote: >> We certainly don't want to see two deprecation warnings for a single >> deprecated behavior. I suggest eliminating the "struct integer >> wrapping" warning, mostly because I had no idea what it _meant_ >> before reading the co

Re: [Python-Dev] test_gzip/test_tarfile failure om AMD64

2006-05-30 Thread Bob Ippolito
On May 29, 2006, at 8:00 PM, Tim Peters wrote: > [Bob Ippolito] >>> ... >>> Actually, should this be a FutureWarning or a DeprecationWarning? > > Since it was never documented, UndocumentedBugGoingAwayError ;-) > Short of that, yes, DeprecationWarning. FutureWarning is for changes > in non-excep

Re: [Python-Dev] Let's stop eating exceptions in dict lookup

2006-05-30 Thread Armin Rigo
Hi Fredrik, On Tue, May 30, 2006 at 07:48:50AM +0200, Fredrik Lundh wrote: > since "abc".find("", 0) == 0, I would have thought that a program that > searched for an empty string in a loop wouldn't get anywhere at all. Indeed. And when this bug was found in the program in question, a natural fi

[Python-Dev] problem with compilation flags used by distutils

2006-05-30 Thread Toon Knapen
We are compiling python on a multitude of platforms using a multitude of compilers and encountered problems when building python and python-extensions when specific flags need to be used by the compiler. For instance, currently we're building the trunk on a Sun Solaris 9 machine using Sun Studi

Re: [Python-Dev] Remove METH_OLDARGS?

2006-05-30 Thread Georg Brandl
Neal Norwitz wrote: > On 5/29/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> >> > OTOH, perhaps a deprecation warning on PyArgs_Parse() is sufficient? >> > What about that? It doesn't address other cases where OLDARGS are >> > used without PyArgs_Parse though. >> >> What other cases remain? P