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

2010-12-09 Thread Vinay Sajip
Glenn Linderman v+python at 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

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

2010-12-09 Thread Vinay Sajip
Vinay Sajip vinay_sajip at yahoo.co.uk writes: Glenn Linderman v+python at 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

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 Lindermanv+pythonat 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

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

2010-12-09 Thread Vinay Sajip
Glenn Linderman v+python at 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

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 =

[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] 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] 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 gu...@python.org wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray rdmur...@bitdance.com 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

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 gu...@python.org wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murray rdmur...@bitdance.com wrote: .. I believe MAL's thought was that the addition of these methods had been approved pre-moratorium, but I don't

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 Rossumgu...@python.org wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murrayrdmur...@bitdance.com wrote: .. I believe MAL's thought was that the addition of these methods had

Re: [Python-Dev] futures API

2010-12-09 Thread Brett Cannon
On Thu, Dec 9, 2010 at 04:26, Thomas Nagy tnagyemail-m...@yahoo.fr 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,

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 Nagytnagyemail-m...@yahoo.fr 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

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 Rossumgu...@python.org wrote: On Fri, Dec 3, 2010 at 9:58 AM, R. David Murrayrdmur...@bitdance.com wrote: .. I believe MAL's thought was that the

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 m...@egenix.com 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

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

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 m...@egenix.com 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.

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 m...@egenix.com 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,

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 gu...@python.org 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

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 alexander.belopol...@gmail.com wrote: On Thu, Dec 9, 2010 at 1:42 PM, Guido van Rossum gu...@python.org wrote: .. string-string transforms use the same namespace even though the typical transform only supports one or the other. E.g. IMO

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 namespace

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öwismar...@v.loewis.de 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

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 solip...@pitrou.net wrote: On Thu, 9 Dec 2010 13:55:08 -0500 Alexander Belopolsky alexander.belopol...@gmail.com wrote: .. This is actually *very* misleading because 'abc'.transform('rot13') 'nop' works even though 'abc' is not an object with

Re: [Python-Dev] kill_python on windows buildbots

2010-12-09 Thread David Bolen
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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 python-check...@python.org 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

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 python 3.2

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 python-check...@python.org 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 consider

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 python-check...@python.org wrote: @@ -588,7 +593,12 @@ pointing to the original callable function. This allows wrapped functions to be

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 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:Security

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

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 mar...@v.loewis.de 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

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 e...@trueblade.com 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,

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 e...@trueblade.com 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

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 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:

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 pyt...@mrabarnett.plus.com 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

[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] 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

[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 solip...@pitrou.net wrote: On Thu, 09 Dec 2010 18:10:38 -0500 Eric Smith e...@trueblade.com 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

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 raymond.hettin...@gmail.com 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

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 raymond.hettin...@gmail.com 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

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 vinay_sa...@yahoo.co.uk wrote: Nick Coghlan ncoghlan at 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

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 v+pyt...@g.nevcal.comv%2bpyt...@g.nevcal.com 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