Re: [Python-Dev] red buildbots on 2.7

2010-06-23 Thread Ronald Oussoren
On 22 Jun, 2010, at 19:05, Alexander Belopolsky wrote: > On Tue, Jun 22, 2010 at 12:39 PM, Ronald Oussoren > wrote: > .. >> Both are valid fixes, both have both advantages and disadvantages. >> >> Your proposal: >> * Reverts to the behavior in 2.6 >> * Ensures that posix.getgroups and posix.set

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Stephen J. Turnbull
James Y Knight writes: > The surrogateescape method is a nice workaround for this, but I can't > help thinking that it might've been better to just treat stuff as > possibly-invalid-but-probably-utf8 byte-strings from input, through > processing, to output. This is the world we already

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread M.-A. Lemburg
Nick Coghlan wrote: > On Wed, Jun 23, 2010 at 4:09 AM, M.-A. Lemburg wrote: >> It would be great if we could have something like the above as >> builtin method: >> >> x.split('&'.as(x)) > > As per my other message, another possible (and reasonably intuitive) > spelling would be: > > x.split(x.

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Nick Coghlan
On Wed, Jun 23, 2010 at 7:18 PM, M.-A. Lemburg wrote: > Note that the point of using a builtin method was to get > better performance. Such type adaptions are often needed in > loops, so adding a few extra Python function calls just to > convert a str object to a bytes object or vice-versa is a >

Re: [Python-Dev] WPython 1.1 was released

2010-06-23 Thread Steven D'Aprano
On Wed, 23 Jun 2010 08:12:36 pm Cesare Di Mauro wrote: > I've released WPython 1.1, which brings many optimizations and > refactorings. For those of us who don't know what WPython is, and are too lazy, too busy, or reading their email off-line, could you give us a one short paragraph description

Re: [Python-Dev] WPython 1.1 was released

2010-06-23 Thread Cesare Di Mauro
2010/6/23 Steven D'Aprano > On Wed, 23 Jun 2010 08:12:36 pm Cesare Di Mauro wrote: > > I've released WPython 1.1, which brings many optimizations and > > refactorings. > > For those of us who don't know what WPython is, and are too lazy, too > busy, or reading their email off-line, could you give

Re: [Python-Dev] email package status in 3.X

2010-06-23 Thread Steve Holden
Guido van Rossum wrote: > On Tue, Jun 22, 2010 at 9:37 AM, Tres Seaver wrote: >> Any "turdiness" (which I am *not* arguing for) is a natural consequence >> of the kinds of backward incompatibilities which were *not* ruled out >> for Python 3, along with the (early, now waning) "build it and they w

Re: [Python-Dev] red buildbots on 2.7

2010-06-23 Thread Alexander Belopolsky
On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote: .. > I don't agree.  The patch itself is pretty simple, but it does make a rather > significant change to the build process: the > compile-time environment in configure would be different than during the > compilation of posixmodule. That i

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread P.J. Eby
At 08:34 PM 6/22/2010 -0400, Glyph Lefkowitz wrote: I suspect the practical problem here is that there's no CharacterString ABC That, and the absence of a string coercion protocol so that mixing your custom string with standard strings will do the right thing for your intended use.

[Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Alexander Belopolsky
On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote: .. >> >>> * [Ronald's proposal] results in posix.getgroups not reflecting results of >>> posix.setgroups >>> >> >> This effectively substitutes getgrouplist called on the current user >> for getgroups.  In 3.x, I believe the correct action w

Re: [Python-Dev] red buildbots on 2.7

2010-06-23 Thread ronaldoussoren
On 23 Jun, 2010,at 04:06 PM, Alexander Belopolsky wrote:On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote: .. > I don't agree.  The patch itself is pretty simple, but it does make a rather significant change to the build process: the > compile-time environment in configure would be different

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stephen J. Turnbull wrote: > We do need str-based implementations of modules like urllib. Why would that be? URLs aren't text, and never will be. The fact that to the eye they may seem to be text-ish doesn't make them text. This *is* a case where

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Alexander Belopolsky
In my previous post, I forgot to include the link to the tracker issue where this problem is being worked on. http://bugs.python.org/issue7900 I'll repost my message there as an issue comment, so that a more detailed technical discussion can continue there. ___

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander Belopolsky wrote: > In my view, getgroups and getgrouplist are two fundamentally different > operations and both should be provided by the os module. Redefining > os.getgroups to invoke getgrouplist instead of system getgroups on one > part

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Guido van Rossum
On Wed, Jun 23, 2010 at 8:30 AM, Tres Seaver wrote: > Stephen J. Turnbull wrote: > >> We do need str-based implementations of modules like urllib. > > Why would that be?  URLs aren't text, and never will be.  The fact that > to the eye they may seem to be text-ish doesn't make them text.  This > *

Re: [Python-Dev] Use of cgi.escape can lead to XSS vulnerabilities

2010-06-23 Thread Craig Younkins
http://bugs.python.org/issue9061 On Tue, Jun 22, 2010 at 5:29 PM, Bill Janssen wrote: > Craig Younkins wrote: > > > cgi.escape never escapes single quote characters, which can easily lead > to a > > Cross-Site Scripting (XSS) vulnerability. This seems to be known by many, > > but a quick search

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Barry Warsaw
On Jun 23, 2010, at 08:43 AM, Guido van Rossum wrote: >So I propose that we drop the discussion "are URLs text or bytes" and >try to find something more pragmatic to discuss. email has exactly the same question, and the answer is "yes". >For example: how we can make the suite of functions used

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Bill Janssen
Tres Seaver wrote: > Stephen J. Turnbull wrote: > > > We do need str-based implementations of modules like urllib. > > Why would that be? URLs aren't text, and never will be. The fact that > to the eye they may seem to be text-ish doesn't make them text. This URLs are exactly text (strings,

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Ian Bicking
On Wed, Jun 23, 2010 at 10:30 AM, Tres Seaver wrote: > Stephen J. Turnbull wrote: > > > We do need str-based implementations of modules like urllib. > > > Why would that be? URLs aren't text, and never will be. The fact that > to the eye they may seem to be text-ish doesn't make them text. Th

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Bill Janssen
Guido van Rossum wrote: > So I propose that we drop the discussion "are URLs text or bytes" and > try to find something more pragmatic to discuss. > > For example: how we can make the suite of functions used for URL > processing more polymorphic, so that each developer can choose for > herself h

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Ian Bicking
Oops, I forgot some important quoting (important for the algorithm, maybe not actually for the discussion)... from urllib.parse import urlsplit, urlunsplit import encodings.idna # urllib.parse.quote both always returns str, and is not as conservative in quoting as required here... def quote_unsaf

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Glyph Lefkowitz
On Jun 22, 2010, at 8:57 PM, Robert Collins wrote: > bzr has a cache of decoded strings in it precisely because decode is > slow. We accept slowness encoding to the users locale because thats > typically much less data to examine than we've examined while > generating the commit/diff/whatever. We

Re: [Python-Dev] WPython 1.1 was released

2010-06-23 Thread Terry Reedy
On 6/23/2010 7:28 AM, Cesare Di Mauro wrote: sorry, I made a mistake, assuming that the project was known. A common mistake of people who announce their projects ;-) Someone recently make the same mistake on python-list with respect to a 'BDD' package (the Wikipedia suggests about 6 possible

Re: [Python-Dev] WPython 1.1 was released

2010-06-23 Thread Cesare Di Mauro
2010/6/23 Terry Reedy > On 6/23/2010 7:28 AM, Cesare Di Mauro wrote: > WPython is a CPython 2.6.4 implementation that uses "wordcodes" instead > of bytecodes. A wordcode is a word (16 bits, two bytes, in this case) > > I suggest you specify the base version (2.6.4) on the project page as that > w

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Janssen wrote: > The bigger problem seems to be that we're revisiting the design > discussion about urllib.parse from the summer of 2008. See > http://bugs.python.org/issue3300 if you want to recall how we hashed > this out 2 years ago. I didn'

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Martin v. Löwis
The problem that _DARWIN_C_SOURCE introduces is that it replaces system getgroups with a database query effectively making the true process' list of supplementary group IDs inaccessible to programs. See source code at . If

Re: [Python-Dev] email package status in 3.X

2010-06-23 Thread Glyph Lefkowitz
On Jun 23, 2010, at 8:17 AM, Steve Holden wrote: > Guido van Rossum wrote: >> On Tue, Jun 22, 2010 at 9:37 AM, Tres Seaver wrote: >>> Any "turdiness" (which I am *not* arguing for) is a natural consequence >>> of the kinds of backward incompatibilities which were *not* ruled out >>> for Python 3

Re: [Python-Dev] email package status in 3.X

2010-06-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Glyph Lefkowitz wrote: > I don't speak for Tres, but I don't think he wasn't talking about > optimism about *adoption*, overall, but optimism about adoption > *rates*. And I don't think he was talking about it coming from Guido > :). You channel me

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Antoine Pitrou
On Wed, 23 Jun 2010 14:23:33 -0400 Tres Seaver wrote: > > Perhaps such decisions need revisiting in light of subsequent experience > / pain / learning. E.g: > > - - the repeated inability of the web-sig to converge on appropriate > semantics for a Python3-compatible version of the WSGI spec;

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Ronald Oussoren
On 23 Jun, 2010, at 16:48, Alexander Belopolsky wrote: > On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren > wrote: > .. >>> * [Ronald's proposal] results in posix.getgroups not reflecting results of posix.setgroups >>> >>> This effectively substitutes getgrouplist called on t

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Toshio Kuratomi
On Wed, Jun 23, 2010 at 09:36:45PM +0200, Antoine Pitrou wrote: > On Wed, 23 Jun 2010 14:23:33 -0400 > Tres Seaver wrote: > > - - the slow adoption / porting rate of major web frameworks and libraries > > to Python 3. > > Some of the major web frameworks and libraries have a ton of > dependenci

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Antoine Pitrou
On Wed, 23 Jun 2010 17:30:22 -0400 Toshio Kuratomi wrote: > Note that this assumption seems optimistic to me. I started talking to Graham > Dumpleton, author of mod_wsgi a couple years back because mod_wsgi and paste > do decoding of bytes to unicode at different layers which caused problems > fo

[Python-Dev] swig/python and intel's threadedbuildginblocks

2010-06-23 Thread tullarisc
Hi, I've compiled intel's OSS threadedbuidlingblocks library on OpenBSD and put everything in some swig interfaces. Here you go: http://tullarisc.xtreemhost.com/swig.ttb.tgz Love, tullarisc. -- View this message in context: http://old.nabble.com/swig-python-and-intel%27s-threadedbuildginblock

Re: [Python-Dev] [Web-SIG] bytes / unicode

2010-06-23 Thread Henry Precheur
On Wed, Jun 23, 2010 at 09:36:45PM +0200, Antoine Pitrou wrote: > I don't think you can't claim, though, that Python 3 makes things > significantly harder for these frameworks. The proof is that many of > them already give the user unicode strings in Python 2.x. They must > have somehow got the dec

[Python-Dev] what environment variable should contain compiler warning suppression flags?

2010-06-23 Thread Brett Cannon
I finally realized why clang has not been silencing its warnings about unused return values: I have -Wno-unused-value set in CFLAGS which comes before OPT (which defines -Wall) as set in PY_CFLAGS in Makefile.pre.in. I could obviously set OPT in my environment, but that would override the default

Re: [Python-Dev] bytes / unicode

2010-06-23 Thread Toshio Kuratomi
On Wed, Jun 23, 2010 at 11:35:12PM +0200, Antoine Pitrou wrote: > On Wed, 23 Jun 2010 17:30:22 -0400 > Toshio Kuratomi wrote: > > Note that this assumption seems optimistic to me. I started talking to > > Graham > > Dumpleton, author of mod_wsgi a couple years back because mod_wsgi and paste > >

Re: [Python-Dev] Use of cgi.escape can lead to XSS vulnerabilities

2010-06-23 Thread James Y Knight
On Jun 22, 2010, at 5:14 PM, Craig Younkins wrote: I suggest rewording the documentation for the method making it more clear what it should and should not be used for. I would like to see the method changed to properly escape single-quotes, but if it is not changed, the documentation shoul

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Bill Janssen
See also http://gimper.net/viewtopic.php?f=18&t=3185. Bill ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] os.getgroups() on MacOS X Was: red buildbots on 2.7

2010-06-23 Thread Ronald Oussoren
On 24 Jun, 2010, at 3:26, Bill Janssen wrote: > See also http://gimper.net/viewtopic.php?f=18&t=3185. That's because setgroups(3) is limited to 16 groups (that is, the kernel doesn't support more than 16 groups at all). Ronald smime.p7s Description: S/MIME cryptographic signature __