Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Gregory P. Smith
On Wed, Dec 8, 2010 at 9:51 AM, Glenn Linderman > wrote: > On 12/8/2010 4:15 AM, Vinay Sajip wrote: > > You're complaining about too much documentation?! Don't measure it by weight! > > On 12/8/2010 5:57 AM, Vinay Sajip wrote: > > Of course I understand I could be wrong > about this, but I don'

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Gregory P. Smith
On Tue, Dec 7, 2010 at 5:51 PM, Vinay Sajip wrote: > Nick Coghlan gmail.com> writes: > > > Indeed - I was very surprised to find just now that calling > > "logging.warn('Whatever')" is not the same as doing "log = > > logging.getLogger(); log.warn('Whatever')". > > Don't know why you'd be surpri

Re: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Guido van Rossum
On Thu, Dec 9, 2010 at 2:54 PM, Raymond Hettinger wrote: > > On Dec 9, 2010, at 12:29 PM, Alexander Belopolsky wrote: > > The str type already has 40+ methods many of which are not well-suited > to handle the complexities inherent in Unicode.   Rather than rushing > in two more methods that will p

Re: [Python-Dev] API for the new sysconfig module

2010-12-09 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 10:18 AM, Raymond Hettinger wrote: > Does anyone know why this needed a separate module and so many accessor > functions? > ISTM it mostly could have been reduced to single call returning a nested > dictionary. Tarek will likely answer for himself, but I believe it is a

[Python-Dev] Format factories (was Re: sWAPcASE Was: transform() and untransform() methods, and the codec registry)

2010-12-09 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 9:29 AM, Antoine Pitrou wrote: > On Thu, 09 Dec 2010 18:10:38 -0500 > Eric Smith wrote: >> If we're looking to reduce the number of methods on str, I wouldn't mind >> seeing center() and zfill() also go away, since they're trivially >> replaced by format(). > > Well, it's

Re: [Python-Dev] futures API

2010-12-09 Thread Brian Quinlan
On Dec 9, 2010, at 2:39 PM, Raymond Hettinger wrote: On Dec 9, 2010, at 9:02 AM, Brian Quinlan wrote: On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86 ) by the fu

[Python-Dev] API for the new sysconfig module

2010-12-09 Thread Raymond Hettinger
Does anyone know why this needed a separate module and so many accessor functions? ISTM it mostly could have been reduced to single call returning a nested dictionary. Raymond from sysconfig import * import json def sysconf(): return dict(paths = get_paths(), config_vars

Re: [Python-Dev] Can't compile regex module with Python 3.2

2010-12-09 Thread MRAB
On 09/12/2010 23:35, Daniel Stutzbach wrote: On Wed, Dec 8, 2010 at 6:56 PM, MRAB mailto:pyt...@mrabarnett.plus.com>> wrote: Is this change intentional? If so, why does unicodeobject.h still do the mapping? In 3.2b1, unicodeobject.h doesn't map _PyUnicode_IsWhitespace: http://svn.pyth

Re: [Python-Dev] Can't compile regex module with Python 3.2

2010-12-09 Thread Daniel Stutzbach
On Wed, Dec 8, 2010 at 6:56 PM, MRAB wrote: > Is this change intentional? If so, why does unicodeobject.h still do > the mapping? > In 3.2b1, unicodeobject.h doesn't map _PyUnicode_IsWhitespace: http://svn.python.org/view/python/tags/r32b1/Include/unicodeobject.h?view=markup Do you have an old

Re: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Antoine Pitrou
On Thu, 09 Dec 2010 18:10:38 -0500 Eric Smith wrote: > On 12/9/2010 5:54 PM, Raymond Hettinger wrote: > > It would make me happy if we could agree to kill or at least mortally wound > > str.swapcase(). I did some research on what it is go for and found > > that it is a vestige of an old word proce

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 8:54 AM, Eric Smith wrote: > On 12/9/2010 5:45 PM, Raymond Hettinger wrote: >> Trivial function begets a trivial example :-) >> >> If you think it warrants more, I'm open to suggestions. > > I think the issue is that the section is talking about functools.wraps, the > examp

Re: [Python-Dev] Can't compile regex module with Python 3.2

2010-12-09 Thread Martin v. Löwis
Am 09.12.2010 06:57, schrieb Alexander Belopolsky: > On Thu, Dec 9, 2010 at 12:47 AM, "Martin v. Löwis" wrote: > .. >>> However, in Python 3.2b1 the library python32.lib contains only >>> _PyUnicode_IsWhitespace, therefore breaking the build. >>> >>> Is this change intentional? If so, why does uni

Re: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Eric Smith
On 12/9/2010 5:54 PM, Raymond Hettinger wrote: It would make me happy if we could agree to kill or at least mortally wound str.swapcase(). I did some research on what it is go for and found that it is a vestige of an old word processor command to handle the case where a user accidentally left the

Re: [Python-Dev] OpenSSL Vulnerability (openssl-1.0.0a)

2010-12-09 Thread Martin v. Löwis
Am 09.12.2010 13:49, schrieb Hirokazu Yamamoto: > On 2010/11/25 1:23, exar...@twistedmatrix.com wrote: >> Ah. Okay, then Python 3.2 would be vulnerable. Good thing it isn't >> released yet. ;) > > It seems OpenSSL 1.0.0c out. > > http://openssl.org/news/secadv_20101202.txt > >> 02-Dec-2010:

Re: [Python-Dev] [Python-checkins] r86855 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py

2010-12-09 Thread Éric Araujo
Le 09/12/2010 11:57, Michael Foord a écrit : > unittest2 will continue to track changes in unittest. A 0.6.0 release is > planned, with feature parity with the version of unittest in Python 3.2. All right. We’ll just run a sed over our tests and bump our required unittest2 version. Thanks for th

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Eric Smith
On 12/9/2010 5:45 PM, Raymond Hettinger wrote: On Dec 9, 2010, at 2:18 PM, Nick Coghlan wrote: On Fri, Dec 10, 2010 at 2:41 AM, raymond.hettinger wrote: @@ -588,7 +593,12 @@ pointing to the original callable function. This allows wrapped functions to be introspected. It also copies

[Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry

2010-12-09 Thread Raymond Hettinger
On Dec 9, 2010, at 12:29 PM, Alexander Belopolsky wrote: > > The str type already has 40+ methods many of which are not well-suited > to handle the complexities inherent in Unicode. Rather than rushing > in two more methods that will prove to be about as useful as > str.swapcase(), lets conside

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Raymond Hettinger
On Dec 9, 2010, at 2:18 PM, Nick Coghlan wrote: > On Fri, Dec 10, 2010 at 2:41 AM, raymond.hettinger > wrote: >> @@ -588,7 +593,12 @@ >> pointing to the original callable function. This allows wrapped functions >> to >> be introspected. It also copies :attr:`__annotations__` if defined.

Re: [Python-Dev] futures API

2010-12-09 Thread Raymond Hettinger
On Dec 9, 2010, at 9:02 AM, Brian Quinlan wrote: > > On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: > >> Hello, >> >> I am looking forward to replacing a piece of code >> (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by >> the futures module which was announced in py

Re: [Python-Dev] [Python-checkins] r87145 - python/branches/py3k/Doc/whatsnew/3.2.rst

2010-12-09 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 2:41 AM, raymond.hettinger wrote: > @@ -588,7 +593,12 @@ >   pointing to the original callable function.  This allows wrapped functions > to >   be introspected.  It also copies :attr:`__annotations__` if defined.  And > now >   it also gracefully skips over missing attri

Re: [Python-Dev] kill_python on windows buildbots

2010-12-09 Thread David Bolen
Hirokazu Yamamoto writes: > Yes, but test can freeze. In that case, I'm worried that > (snip) > rt.bat # freeze here (will be halt by buildbot) > vcbuild & kill_python_d # Will this be called? > in test.bat. Yeah, you're right. It may be impossible to completely eliminate the ri

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-09 Thread Alexander Belopolsky
On Thu, Dec 9, 2010 at 2:17 PM, Antoine Pitrou wrote: > On Thu, 9 Dec 2010 13:55:08 -0500 > Alexander Belopolsky wrote: .. >> This is actually *very* misleading because >> >> >>> 'abc'.transform('rot13') >> 'nop' >> >> works even though 'abc' is not "an object with the buffer interface". > > Agre

Re: [Python-Dev] Can't compile regex module with Python 3.2

2010-12-09 Thread MRAB
On 09/12/2010 05:57, Alexander Belopolsky wrote: On Thu, Dec 9, 2010 at 12:47 AM, "Martin v. Löwis" wrote: .. However, in Python 3.2b1 the library python32.lib contains only _PyUnicode_IsWhitespace, therefore breaking the build. Is this change intentional? If so, why does unicodeobject.h still

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-09 Thread Éric Araujo
Le 09/12/2010 19:42, Guido van Rossum a écrit : > Given that it's in 3.2b1 I'm okay with keeping it. That's at best a > +0. [...] > though I still don't like that the registries for transforms and > codecs use the same namespace. Also bytes-bytes and > string-string transforms use the same namespa

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-09 Thread Antoine Pitrou
On Thu, 9 Dec 2010 13:55:08 -0500 Alexander Belopolsky wrote: > On Thu, Dec 9, 2010 at 1:42 PM, Guido van Rossum wrote: > .. > > string-string transforms use the same namespace even though the > > typical transform only supports one or the other. E.g. IMO all of the > > following should raise Lo

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-09 Thread Alexander Belopolsky
On Thu, Dec 9, 2010 at 1:42 PM, Guido van Rossum wrote: .. > string-string transforms use the same namespace even though the > typical transform only supports one or the other. E.g. IMO all of the > following should raise LookupError: > b'abc'.transform('rot13') > Traceback (most recent call

Re: [Python-Dev] transform() and untransform() methods, and the codec registry

2010-12-09 Thread Guido van Rossum
On Mon, Dec 6, 2010 at 3:39 AM, M.-A. Lemburg wrote: > Guido van Rossum wrote: >> The moratorium is intended to freeze the state of the language as >> implemented, not whatever was discussed and approved but didn't get >> implemented (that'd be a hole big enough to drive a truck through, as >> the

Re: [Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Thu, Dec 9, 2010 at 10:03 AM, M.-A. Lemburg wrote: >> Alexander Belopolsky wrote: > .. >>> The ticket that introduced the change is >>> currently closed [3] even though the last message suggests that at >>> least part of the change needs to be reverted. >> >> That

Re: [Python-Dev] futures API

2010-12-09 Thread Brian Quinlan
On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86 ) by the futures module which was announced in python 3.2 beta. I am a bit stuck with it, so I have a few questions a

Re: [Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread Alexander Belopolsky
On Thu, Dec 9, 2010 at 10:03 AM, M.-A. Lemburg wrote: > Alexander Belopolsky wrote: .. >> The ticket that introduced the change is >> currently closed [3] even though the last message suggests that at >> least part of the change needs to be reverted. > > That's for Guido to decide. > The decision

Re: [Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread M.-A. Lemburg
Michael Foord wrote: > On 09/12/2010 15:03, M.-A. Lemburg wrote: >> Alexander Belopolsky wrote: >>> On Fri, Dec 3, 2010 at 1:05 PM, Guido van Rossum >>> wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray wrote: >>> .. > I believe MAL's thought was that the addition of these me

Re: [Python-Dev] futures API

2010-12-09 Thread Michael Foord
On 09/12/2010 16:36, Brett Cannon wrote: On Thu, Dec 9, 2010 at 04:26, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the futures module which was announced in python 3.2 beta. I am a bit s

Re: [Python-Dev] futures API

2010-12-09 Thread Brett Cannon
On Thu, Dec 9, 2010 at 04:26, Thomas Nagy wrote: > Hello, > > I am looking forward to replacing a piece of code > (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the > futures module which was announced in python 3.2 beta. I am a bit stuck with > it, so I have a few qu

Re: [Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread Michael Foord
On 09/12/2010 15:03, M.-A. Lemburg wrote: Alexander Belopolsky wrote: On Fri, Dec 3, 2010 at 1:05 PM, Guido van Rossum wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray wrote: .. I believe MAL's thought was that the addition of these methods had been approved pre-moratorium, but I don'

Re: [Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Fri, Dec 3, 2010 at 1:05 PM, Guido van Rossum wrote: >> On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray >> wrote: > .. >>> I believe MAL's thought was that the addition of these methods had >>> been approved pre-moratorium, but I don't know if that is a >>> suff

[Python-Dev] The fate of transform() and untransform() methods

2010-12-09 Thread Alexander Belopolsky
On Fri, Dec 3, 2010 at 1:05 PM, Guido van Rossum wrote: > On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray wrote: .. >> I believe MAL's thought was that the addition of these methods had >> been approved pre-moratorium, but I don't know if that is a >> sufficient argument or not. > > It is not. >

Re: [Python-Dev] OpenSSL Vulnerability (openssl-1.0.0a)

2010-12-09 Thread Hirokazu Yamamoto
On 2010/11/25 1:23, exar...@twistedmatrix.com wrote: Ah. Okay, then Python 3.2 would be vulnerable. Good thing it isn't released yet. ;) It seems OpenSSL 1.0.0c out. http://openssl.org/news/secadv_20101202.txt > 02-Dec-2010: Security Advisory: ciphersuite downgrade fix > 02-Dec-2010:

[Python-Dev] futures API

2010-12-09 Thread Thomas Nagy
Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the futures module which was announced in python 3.2 beta. I am a bit stuck with it, so I have a few questions about the futures: 1. Is the futures API frozen? 2.

Re: [Python-Dev] [Python-checkins] r86855 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py

2010-12-09 Thread Michael Foord
On 09/12/2010 03:45, Éric Araujo wrote: Hello, Author: raymond.hettinger Date: Mon Nov 29 02:38:25 2010 New Revision: 86855 Log: Do not add an obsolete unittest name to Py3.2. Modified: python/branches/py3k/Lib/unittest/case.py -# Old name for assertCountEqual() -assertItemsEqual = asse

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Vinay Sajip
Glenn Linderman g.nevcal.com> writes: > Agreed, they are not necessarily dedicated to apps.  But while they > are running the app, they have the appname in their thread local > storage, no?    So if a thread has the appname in its thread local > storage, is it not servicing that

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Glenn Linderman
On 12/9/2010 12:26 AM, Vinay Sajip wrote: Glenn Linderman g.nevcal.com> writes: > Or what am I missing? That threads are not necessarily dedicated to apps, in a real world setting. Depending on the server implementation, a single thread could be asked to handle requests for different apps ov

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Vinay Sajip
Vinay Sajip yahoo.co.uk> writes: > > Glenn Linderman g.nevcal.com> writes: > > > Or what am I missing? > And one more thing: the filters for *both* apps are called for a given request. One will return True, the other will return False. Bear in mind that the intention of the post is to be di

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-09 Thread Vinay Sajip
Glenn Linderman g.nevcal.com> writes: > Or what am I missing? That threads are not necessarily dedicated to apps, in a real world setting. Depending on the server implementation, a single thread could be asked to handle requests for different apps over its lifetime. So the only way of knowing wh