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

2010-11-24 Thread Antoine Pitrou
Le mardi 23 novembre 2010 à 20:56 -0500, Glyph Lefkowitz a écrit : On Nov 23, 2010, at 9:02 AM, Antoine Pitrou wrote: On Tue, 23 Nov 2010 00:07:09 -0500 Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp wrote:

Re: [Python-Dev] Centos 5.5 freeze during test_concurrent_futures

2010-11-24 Thread Antoine Pitrou
Hi, py3k built from trunk on Centos 5.5 freezes during regrtest on test_concurrent_futures with Fatal Python error: Invalid thread state for this thread. As in a typical concurrent problem, subsequent calls freeze in different test cases, but the freeze itself is always reproducible and

Re: [Python-Dev] http.server - reference to bug #427345

2010-11-24 Thread Antoine Pitrou
On Tue, 23 Nov 2010 22:35:10 -0600 Brian Curtin brian.cur...@gmail.com wrote: On Tue, Nov 23, 2010 at 22:28, Glenn Linderman v+pyt...@g.nevcal.comv%2bpyt...@g.nevcal.com wrote: Where might I find the bug #427345 that is referred to in a comment inside http.server ? Here is a code

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Stephen J. Turnbull
James Y Knight writes: a) You seem to be hung up implementation details of emacs. Hung up? No. It's the program whose text model I know best, and even if its design could theoretically be a lot better for this purpose, I can't say I've seen a real program whose model is obviously better for

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Stephen J. Turnbull
James Y Knight writes: But, now, if your choices are UTF-8 or UTF-16, UTF-8 is clearly superior [...]a because it is an ASCII superset, and thus more easily compatible with other software. That also makes it most commonly used for internet communication. Sure, UTF-8 is very nice as a

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 18:51:49 +0900 Stephen J. Turnbull step...@xemacs.org wrote: James Y Knight writes: But, now, if your choices are UTF-8 or UTF-16, UTF-8 is clearly superior [...]a because it is an ASCII superset, and thus more easily compatible with other software. That also makes

Re: [Python-Dev] r86726 - python/branches/release27-maint/Objects/setobject.c

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 11:39:23 +0100 (CET) armin.rigo python-check...@python.org wrote: Author: armin.rigo Date: Wed Nov 24 11:39:23 2010 New Revision: 86726 Log: A no-op change. It looks like this call was not meant to be a recursive call, but just call the helper (which the recursive call

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Michael Foord
On 23/11/2010 14:16, Nick Coghlan wrote: On Tue, Nov 23, 2010 at 11:50 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: PEP 354 was rejected for two primary reasons - lack of interest and nowhere obvious to put it. Would it be *so bad* if an enum type lived in its own module? There is

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Nick Coghlan
On Wed, Nov 24, 2010 at 10:30 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: Based on a non-exhaustive search, Python standard library modules currently using integers for constants: Thanks for that review. I think following up on the NamedConstant idea may make more sense than pursuing

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

2010-11-24 Thread exarkun
On 08:02 am, solip...@pitrou.net wrote: Le mardi 23 novembre 2010 � 20:56 -0500, Glyph Lefkowitz a �crit : On Nov 23, 2010, at 9:02 AM, Antoine Pitrou wrote: On Tue, 23 Nov 2010 00:07:09 -0500 Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Mon, Nov 22, 2010 at 11:13 PM, Hirokazu Yamamoto

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

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 15:01:06 - exar...@twistedmatrix.com wrote: If I believe the link above: 1CAny OpenSSL based TLS server is vulnerable if it is multi-threaded and uses OpenSSL's internal caching mechanism. Servers that are multi-process and/or disable internal session caching are NOT

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Steven D'Aprano
Nick Coghlan wrote: On Wed, Nov 24, 2010 at 10:30 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: Based on a non-exhaustive search, Python standard library modules currently using integers for constants: Thanks for that review. I think following up on the NamedConstant idea may make more

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

2010-11-24 Thread exarkun
On 03:11 pm, solip...@pitrou.net wrote: On Wed, 24 Nov 2010 15:01:06 - exar...@twistedmatrix.com wrote: If I believe the link above: 1CAny OpenSSL based TLS server is vulnerable if it is multi-threaded and uses OpenSSL's internal caching mechanism. Servers that are multi-process and/or

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Benjamin Peterson
2010/11/24 Steven D'Aprano st...@pearwood.info: Nick Coghlan wrote: On Wed, Nov 24, 2010 at 10:30 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: Based on a non-exhaustive search, Python standard library modules currently using integers for constants: Thanks for that review. I think

[Python-Dev] Fwd: constant/enum type in stdlib

2010-11-24 Thread Joao S. O. Bueno
Hi -- If I may add my 0.02 cents - this sample has a sample implementation of the proposed features I found most interesting up to now: 1) inherit from int 2) display the constant's name on 'repr' 3) optionally populate a module with the constants 4) Optionally provide a starting value for the

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Alexander Belopolsky
On Tue, Nov 23, 2010 at 2:18 PM, Amaury Forgeot d'Arc amaur...@gmail.com wrote: .. Given the apparent difficulty of writing even basic text processing algorithms in presence of surrogate pairs, I wonder how wise it is to expose Python users to them. This was already discussed two years ago:

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Michael Foord
On 24/11/2010 14:08, Nick Coghlan wrote: On Wed, Nov 24, 2010 at 10:30 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: Based on a non-exhaustive search, Python standard library modules currently using integers for constants: Thanks for that review. I think following up on the NamedConstant

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread M.-A. Lemburg
Alexander Belopolsky wrote: To conclude, I feel that rather than trying to fully support non-BMP characters as surrogate pairs in narrow builds, we should make it easier for application developers to avoid them. I don't understand what you're after here. Programmers can easily avoid them by

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Brett Cannon
On Tue, Nov 23, 2010 at 15:07, Terry Reedy tjre...@udel.edu wrote: On 11/23/2010 5:43 PM, Éric Araujo wrote: Modified: python/branches/py3k/Misc/ACKS == --- python/branches/py3k/Misc/ACKS      (original) +++

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy
On 11/24/2010 2:04 PM, Brett Cannon wrote: On Tue, Nov 23, 2010 at 15:07, Terry Reedytjre...@udel.edu wrote: I used Notepad to edit the file, TortoiseSvn to commit, the same as I did for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday. If the latter is OK, perhaps *.py gets filtered

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Georg Brandl
Am 24.11.2010 20:25, schrieb Terry Reedy: On 11/24/2010 2:04 PM, Brett Cannon wrote: On Tue, Nov 23, 2010 at 15:07, Terry Reedytjre...@udel.edu wrote: I used Notepad to edit the file, TortoiseSvn to commit, the same as I did for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday. If the

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Alexander Belopolsky
On Wed, Nov 24, 2010 at 1:50 PM, M.-A. Lemburg m...@egenix.com wrote: .. add an option for decoders that currently produce surrogate pairs to treat non-BMP characters as errors and handle them according to user's choice. But what do you gain by doing this ? You'd lose the round-trip safety

[Python-Dev] [Preview] Comments and change proposals on documentation

2010-11-24 Thread Georg Brandl
Hi, at http://dpo.gbrandl.de/contents, you can look at a version of the 3.2 docs that has the upcoming commenting feature. JavaScript is mandatory. I've switched on anonymous comments for testing, but usually at least comments from anonymous users can be moderated. Be sure to test the propose a

[Python-Dev] collect2: library libpython2.6 not found while building extensions (--enable-shared)

2010-11-24 Thread Anurag Chourasia
All, When I configure python to enable shared libraries, none of the extensions are getting built during the make step due to this error. building 'cStringIO' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I.

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Martin v. Löwis
So I presume it did the same with IOBinding.py. No. This file contains only ASCII characters, so notepad has decided to not add the BOM. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread average
Is immutability a general need that should have general solution? By generalizing the idea to lists/tuples, set/frozenset, dicts, and strings (for example), it seems one could simplify the container classes, eliminate code complexity, and perhaps improve resource utilization. mark

Re: [Python-Dev] r86731 - in python/branches/py3k: Lib/distutils/command/install.py Lib/distutils/sysconfig.py Lib/sysconfig.py Makefile.pre.in Misc/python.pc.in configure configure.in

2010-11-24 Thread Antoine Pitrou
On Wed, 24 Nov 2010 20:43:47 +0100 (CET) barry.warsaw python-check...@python.org wrote: Author: barry.warsaw Date: Wed Nov 24 20:43:47 2010 New Revision: 86731 Log: Final patch for issue 9807. This seems to have broken compilation under Windows: Build started: Project: ssl, Configuration:

Re: [Python-Dev] r86731 - in python/branches/py3k: Lib/distutils/command/install.py Lib/distutils/sysconfig.py Lib/sysconfig.py Makefile.pre.in Misc/python.pc.in configure configure.in

2010-11-24 Thread Barry Warsaw
On Nov 25, 2010, at 12:41 AM, Antoine Pitrou wrote: On Wed, 24 Nov 2010 20:43:47 +0100 (CET) barry.warsaw python-check...@python.org wrote: Author: barry.warsaw Date: Wed Nov 24 20:43:47 2010 New Revision: 86731 Log: Final patch for issue 9807. This seems to have broken compilation under

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Greg Ewing
On 24/11/10 13:22, James Y Knight wrote: Instead, provide bidirectional iterators which can traverse the string by byte, codepoint, or by grapheme Maybe it would be a good idea to add some iterators like this to Python. (Or has the time machine beaten me there?) -- Greg

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Stephen J. Turnbull
Alexander Belopolsky writes: Any non-trivial text processing is likely to be broken in presence of surrogates. If you're worried about this, write a UCS-2-producing codec that rejects surrogates or stuffs them into the private zone of the BMP. Maybe such a codec should be default, but so far

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Greg Ewing
On 24/11/10 22:03, Stephen J. Turnbull wrote: But if you actually need to remember positions, or regions, to jump to later or to communicate to other code that manipulates them, doing this stuff the straightforward way (just copying the whole iterator object to hang on to its state) becomes

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Greg Ewing
On 25/11/10 06:37, Alexander Belopolsky wrote: I don't think there is a recipe on how to fix legacy character-by-character processing loop such as for c in string: ... to make it iterate over code points consistently in wide and narrow builds. A couple of possibilities: 1) Make

Re: [Python-Dev] constant/enum type in stdlib

2010-11-24 Thread Greg Ewing
On 25/11/10 12:38, average wrote: Is immutability a general need that should have general solution? I don't think it really generalizes. Tuples are not just frozen lists, for example -- they have a different internal structure that's more efficient to create and access. -- Greg

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Stephen J. Turnbull
Greg Ewing writes: On 24/11/10 22:03, Stephen J. Turnbull wrote: But if you actually need to remember positions, or regions, to jump to later or to communicate to other code that manipulates them, doing this stuff the straightforward way (just copying the whole iterator object to

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Alexander Belopolsky
On Wed, Nov 24, 2010 at 9:17 PM, Stephen J. Turnbull step...@xemacs.org wrote: ..   I note that an opinion has been raised on this thread that   if we want compressed internal representation for strings, we should   use UTF-8.  I tend to agree, but UTF-8 has been repeatedly rejected as   too

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy
On 11/24/2010 3:04 PM, Georg Brandl wrote: Adding the BOM will be an editor thing, not a svn thing. Doing a It should show up as an invisible change in the first line of a file when you look at a svn diff. (It is a very good practice to look at a diff before committing anyway.) It does

Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy
On 11/24/2010 5:13 PM, Martin v. Löwis wrote: So I presume it did the same with IOBinding.py. No. This file contains only ASCII characters, so notepad has decided to not add the BOM. Or it somehow got removed from the .py file. I tried with another .py file (and reverted!) and the diff

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-24 Thread Terry Reedy
On 11/24/2010 3:06 PM, Alexander Belopolsky wrote: Any non-trivial text processing is likely to be broken in presence of surrogates. Producing them on input is just trading known issue for an unknown one. Processing surrogate pairs in python code is hard. Software that has to support non-BMP